package com.zhongshengnetwork.rightbe.common;

import android.util.Log;

import com.google.gson.Gson;
import com.zhongshengnetwork.rightbe.Adv.model.AdvertUtils;
import com.zhongshengnetwork.rightbe.Adv.model.SPManageUtils;
import com.zhongshengnetwork.rightbe.Constant.APIKey;
import com.zhongshengnetwork.rightbe.CustomApplication;
import com.zhongshengnetwork.rightbe.commentstore.model.CommentStoreClassifyModel;
import com.zhongshengnetwork.rightbe.commentstore.model.CommentStoreModel;
import com.zhongshengnetwork.rightbe.dbmodel.LetterdbModel;
import com.zhongshengnetwork.rightbe.dbmodel.LogindbModel;
import com.zhongshengnetwork.rightbe.dbmodel.PeopledbModel;
import com.zhongshengnetwork.rightbe.dbmodel.PicdbModel;
import com.zhongshengnetwork.rightbe.gsonmodel.*;
import com.zhongshengnetwork.rightbe.lang.model.BookmarkModel;
import com.zhongshengnetwork.rightbe.wzt.model.TwoTuple;

import org.json.JSONArray;
import org.json.JSONObject;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by GordonLjx on 2016/9/18.
 */
public class GsonTools {

    /**
     * http请求通用模型
     * @param jsonString
     * @return
     */
    public static CommonModel getCommonModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                Gson mgson = new Gson();
                CommonModel model = mgson.fromJson(
                        jsonString, CommonModel.class);
                return model;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 微信登陆模型
     * @param jsonString
     * @return
     */
    public static WXLoginModel getWXLoginModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                Gson mgson = new Gson();
                WXLoginModel model = mgson.fromJson(
                        jsonString, WXLoginModel.class);
                return model;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 微信用户信息模型
     * @param jsonString
     * @return
     */
    public static WXUserInfoModel getWXUserInfoModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                Gson mgson = new Gson();
                WXUserInfoModel model = mgson.fromJson(
                        jsonString, WXUserInfoModel.class);
                return model;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 登录模型
     * @param jsonString
     * @return
     */
    public static LogindbModel getLoginModel(String jsonString, String key){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                key = key.substring(0,16);
                String dataStr = BackAES.decrypt(jsonString,key,0);

//                JSONObject jsonObject = CommonUtils.stringToJson(dataStr);
//                if (jsonObject != null && jsonObject.has("iswhite")){
//                    );
//                }
                //Log.e("TAG", "登录信息："+dataStr);


                Gson mgson = new Gson();
                LogindbModel model = mgson.fromJson(
                        dataStr, LogindbModel.class);

                LoginInfoModel infoModel = mgson.fromJson(dataStr, LoginInfoModel.class);
                if (infoModel != null && !CommonUtils.isEmpty(infoModel.getIswhite()) && infoModel.getIswhite().equals("1")){
                    SPManageUtils.getInstance(CustomApplication.mContext).putSPBoolean(AdvertUtils.whiteKey, true);
                }else {
                    SPManageUtils.getInstance(CustomApplication.mContext).putSPBoolean(AdvertUtils.whiteKey, false);
                }

                return model;
            }catch (Exception e){
               return null;
            }
        }
        return null;
    }

    /**
     * 第三方登陆信息模型
     * @param jsonString
     * @return
     */
    public static LogindbModel getThirdLogindbModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                Gson mgson = new Gson();
                LogindbModel model = mgson.fromJson(
                        jsonObject.getString(APIKey.dataKey), LogindbModel.class);

                LoginInfoModel infoModel = mgson.fromJson(jsonObject.getString(APIKey.dataKey), LoginInfoModel.class);
                if (infoModel != null && !CommonUtils.isEmpty(infoModel.getIswhite()) && infoModel.getIswhite().equals("1")){
                    SPManageUtils.getInstance(CustomApplication.mContext).putSPBoolean(AdvertUtils.whiteKey, true);
                }else {
                    SPManageUtils.getInstance(CustomApplication.mContext).putSPBoolean(AdvertUtils.whiteKey, false);
                }

                return model;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 第三方登陆信息模型
     * @param jsonString
     * @return
     */
    public static BindInfoModel getBindInfoModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                Gson mgson = new Gson();
                BindInfoModel model = mgson.fromJson(
                        jsonObject.getString(APIKey.dataKey), BindInfoModel.class);
                return model;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 账户信息模型
     * @param jsonString
     * @return
     */
    public static AccountInfoModel getAccountInfoModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                Gson mgson = new Gson();
                AccountInfoModel model = mgson.fromJson(
                        jsonObject.getString(APIKey.dataKey), AccountInfoModel.class);
                return model;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }


    //获取一元状态
    public static void getOneBuyState(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString(APIKey.dataKey);
                if (CommonUtils.isEmpty(dataString)){
                    return;
                }
                //System.out.print("dataString="+dataString+"\n");
                JSONObject jsonData = CommonUtils.stringToJson(dataString);
                String state = jsonData.getString(APIKey.stateKey);
                if (CommonUtils.isEmpty(state) || state.equals("1")){
                    CustomApplication.isHasOne = true;
                }else {
                    CustomApplication.isHasOne = false;
                }
                String name = jsonData.getString(APIKey.nameKey);
                if (CommonUtils.isEmpty(name)){

                }else {
                    CustomApplication.centerName = name;
                }
            }catch (Exception e){
            }
        }
    }

    /**
     * 首页轮播图模型
     * @param jsonString
     * @return
     */
    public static List<CarousefigureModel> getCarousefigureModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                List<CarousefigureModel> list = new ArrayList<>();
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString(APIKey.dataKey);
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                //System.out.print("dataString="+dataString+"\n");
                JSONObject jsonData = CommonUtils.stringToJson(dataString);
                //System.out.print("jsonData="+jsonData.getString(APIKey.carouselfigureKey)+"\n");
                JSONArray jsonArray = CommonUtils.stringToJsonArray(jsonData.getString(APIKey.carouselfigureKey));
                if (jsonArray != null && jsonArray.length() > 0){
                    for (int i = 0; i < jsonArray.length(); i++){
                        //System.out.print("jsonArray.get(i)="+jsonArray.getString(i)+"\n");
                        Gson mgson = new Gson();
                        String string = jsonArray.getString(i);
                        //System.out.print("string="+string+"\n");
                        CarousefigureModel model = mgson.fromJson(
                                string, CarousefigureModel.class);
                        list.add(model);
                    }
                }else {
                    //System.out.print("jsonArray是空的\n");
                }
                return list;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 首页推荐商品
     * @param jsonString
     * @return
     */
    public static List<RecommendModel> getRecommendModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                List<RecommendModel> list = new ArrayList<>();
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString(APIKey.dataKey);
                //System.out.print("dataString="+dataString+"\n");
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                JSONObject jsonData = CommonUtils.stringToJson(dataString);
                //System.out.print("jsonData="+jsonData.getString(APIKey.carouselfigureKey)+"\n");
                JSONArray jsonArray = CommonUtils.stringToJsonArray(jsonData.getString(APIKey.recommendKey));
                if (jsonArray != null && jsonArray.length() > 0){
                    for (int i = 0; i < jsonArray.length(); i++){
                        //System.out.print("jsonArray.get(i)="+jsonArray.getString(i)+"\n");
                        Gson mgson = new Gson();
                        String string = jsonArray.getString(i);
                        //System.out.print("string="+string+"\n");
                        RecommendModel model = mgson.fromJson(
                                string, RecommendModel.class);
                        list.add(model);
                    }
                }else {
                    //System.out.print("jsonArray是空的\n");
                }
                return list;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 获取商品类型模型
     * @param jsonString
     * @return
     */
    public static List<GoodsTypeModel> getGoodsTypeModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                List<GoodsTypeModel> list = new ArrayList<>();
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString(APIKey.dataKey);
                //System.out.print("dataString="+dataString+"\n");
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                JSONObject jsonData = CommonUtils.stringToJson(dataString);
                //System.out.print("jsonData="+jsonData.getString(APIKey.carouselfigureKey)+"\n");
                JSONArray jsonArray = CommonUtils.stringToJsonArray(jsonData.getString(APIKey.goodstypeKey));
                if (jsonArray != null && jsonArray.length() > 0){
                    for (int i = 0; i < jsonArray.length(); i++){
                        //System.out.print("jsonArray.get(i)="+jsonArray.getString(i)+"\n");
                        Gson mgson = new Gson();
                        String string = jsonArray.getString(i);
                        //System.out.print("string="+string+"\n");
                        GoodsTypeModel model = mgson.fromJson(
                                string, GoodsTypeModel.class);
                        list.add(model);
                    }
                }else {
                    //System.out.print("jsonArray是空的\n");
                }
                return list;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 获取在售商品列表模型
     * @param jsonString
     * @return
     */
    public static List<SailGoodsListModel> getSailGoodsListModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                List<SailGoodsListModel> list = new ArrayList<>();
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString(APIKey.dataKey);
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                JSONArray jsonArray = CommonUtils.stringToJsonArray(dataString);
                if (jsonArray != null && jsonArray.length() > 0){
                    for (int i = 0; i < jsonArray.length(); i++){
                        //System.out.print("jsonArray.get(i)="+jsonArray.getString(i)+"\n");
                        Gson mgson = new Gson();
                        String string = jsonArray.getString(i);
                        //System.out.print("string="+string+"\n");
                        SailGoodsListModel model = mgson.fromJson(
                                string, SailGoodsListModel.class);
                        list.add(model);
                    }
                }else {
                    //System.out.print("jsonArray是空的\n");
                }
                return list;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 商品详情信息模型
     * @param jsonString
     * @return
     */
    public static GoodsDetailModel getGoodsDetailModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                Gson mgson = new Gson();
                GoodsDetailModel model = mgson.fromJson(
                        jsonObject.getString(APIKey.dataKey), GoodsDetailModel.class);
                return model;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 商品详情信息模型
     * @param jsonString
     * @return
     */
    public static ZZGoodsDetailModel getZZGoodsDetailModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                Gson mgson = new Gson();
                ZZGoodsDetailModel model = mgson.fromJson(
                        jsonObject.getString(APIKey.dataKey), ZZGoodsDetailModel.class);
                return model;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 商品记录数模型
     * @param jsonString
     * @return
     */
    public static GoodsSailCountModel getGoodsSailCountModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                Gson mgson = new Gson();
                GoodsSailCountModel model = mgson.fromJson(
                        jsonObject.getString(APIKey.dataKey), GoodsSailCountModel.class);
                return model;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 商品购买记录号码模型
     * @param jsonString
     * @return
     */
    public static List<GoodsbuyrecordModel> getGoodsbuyrecordModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                List<GoodsbuyrecordModel> list = new ArrayList<GoodsbuyrecordModel>();
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString(APIKey.dataKey);
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                JSONArray jsonArray = CommonUtils.stringToJsonArray(dataString);
                if (jsonArray != null && jsonArray.length() > 0){
                    for (int i = 0; i < jsonArray.length(); i++){
                        Gson mgson = new Gson();
                        String string = jsonArray.getString(i);
                        GoodsbuyrecordModel model = mgson.fromJson(
                                string, GoodsbuyrecordModel.class);
                        list.add(model);
                    }
                }else {
                    //System.out.print("jsonArray是空的\n");
                }
                return list;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }



    /**
     * 获取支付信息模型
     * @param jsonString
     * @return
     */
    public static PayInfoModel getPayInfoModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                Gson mgson = new Gson();
                PayInfoModel model = mgson.fromJson(
                        jsonObject.getString(APIKey.dataKey), PayInfoModel.class);
                return model;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 获取支付结果信息模型
     * @param jsonString
     * @return
     */
    public static List<PayResultModel> getPayResultModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                List<PayResultModel> list = new ArrayList<PayResultModel>();
                JSONArray jsonArray = CommonUtils.stringToJsonArray(jsonString);
                if (jsonArray != null && jsonArray.length() > 0){
                    for (int i = 0; i < jsonArray.length(); i++){
                        Gson mgson = new Gson();
                        String string = jsonArray.getString(i);
                        PayResultModel model = mgson.fromJson(
                                string, PayResultModel.class);
                        list.add(model);
                    }
                }else {
                    //System.out.print("jsonArray是空的\n");
                }
                return list;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 商品购买记录号码模型
     * @param jsonString
     * @return
     */
    public static List<ShopRecordModel> getShopRecordModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                List<ShopRecordModel> list = new ArrayList<ShopRecordModel>();
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString(APIKey.dataKey);
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                JSONArray jsonArray = CommonUtils.stringToJsonArray(dataString);
                if (jsonArray != null && jsonArray.length() > 0){
                    for (int i = 0; i < jsonArray.length(); i++){
                        Gson mgson = new Gson();
                        String string = jsonArray.getString(i);
                        ShopRecordModel model = mgson.fromJson(
                                string, ShopRecordModel.class);
                        list.add(model);
                    }
                }else {
                    //System.out.print("jsonArray是空的\n");
                }
                return list;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 商品获得模型
     * @param jsonString
     * @return
     */
    public static List<WinGoodsModel> getWinGoodsModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                List<WinGoodsModel> list = new ArrayList<WinGoodsModel>();
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString(APIKey.dataKey);
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                JSONArray jsonArray = CommonUtils.stringToJsonArray(dataString);
                if (jsonArray != null && jsonArray.length() > 0){
                    for (int i = 0; i < jsonArray.length(); i++){
                        Gson mgson = new Gson();
                        String string = jsonArray.getString(i);
                        WinGoodsModel model = mgson.fromJson(
                                string, WinGoodsModel.class);
                        list.add(model);
                    }
                }else {
                    //System.out.print("jsonArray是空的\n");
                }
                return list;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 获取订单详情
     * @param jsonString
     * @return
     */
    public static OrderDetailModel getOrderDetailModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                Gson mgson = new Gson();
                OrderDetailModel model = mgson.fromJson(
                        jsonObject.getString(APIKey.dataKey), OrderDetailModel.class);
                return model;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 获取客服热线
     * @param jsonString
     * @return
     */
    public static String getCustomMobile(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                return jsonObject.getString(APIKey.mobileKey);
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 物流详情
     * @param jsonString
     * @return
     */
    public static List<LogisticalModel> getLogisticalModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                List<LogisticalModel> list = new ArrayList<LogisticalModel>();
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString(APIKey.dataKey);
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                JSONArray jsonArray = CommonUtils.stringToJsonArray(dataString);
                if (jsonArray != null && jsonArray.length() > 0){
                    for (int i = 0; i < jsonArray.length(); i++){
                        Gson mgson = new Gson();
                        String string = jsonArray.getString(i);
                        LogisticalModel model = mgson.fromJson(
                                string, LogisticalModel.class);
                        list.add(model);
                    }
                }else {
                    //System.out.print("jsonArray是空的\n");
                }
                return list;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 晒单列表
     * @param jsonString
     * @return
     */
    public static List<DryListModel> getDryListModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                List<DryListModel> list = new ArrayList<DryListModel>();
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString(APIKey.dataKey);
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                JSONArray jsonArray = CommonUtils.stringToJsonArray(dataString);
                if (jsonArray != null && jsonArray.length() > 0){
                    for (int i = 0; i < jsonArray.length(); i++){
                        Gson mgson = new Gson();
                        String string = jsonArray.getString(i);
                        DryListModel model = mgson.fromJson(
                                string, DryListModel.class);
                        list.add(model);
                    }
                }else {
                    //System.out.print("jsonArray是空的\n");
                }
                return list;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 获取晒单详情
     * @param jsonString
     * @return
     */
    public static DryDetailModel getDryDetailModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                Gson mgson = new Gson();
                DryDetailModel model = mgson.fromJson(
                        jsonObject.getString(APIKey.dataKey), DryDetailModel.class);
                return model;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 获取晒单详情评论
     * @param jsonString
     * @return
     */
    public static List<DryCommentModel> getDryCommentModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                List<DryCommentModel> list = new ArrayList<DryCommentModel>();
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString(APIKey.commentKey);
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                JSONArray jsonArray = CommonUtils.stringToJsonArray(dataString);
                if (jsonArray != null && jsonArray.length() > 0){
                    for (int i = 0; i < jsonArray.length(); i++){
                        Gson mgson = new Gson();
                        String string = jsonArray.getString(i);
                        DryCommentModel model = mgson.fromJson(
                                string, DryCommentModel.class);
                        list.add(model);
                    }
                }else {
                    //System.out.print("jsonArray是空的\n");
                }
                return list;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 获取晒单评论列表
     * @param jsonString
     * @return
     */
    public static List<DryCommentModel> getDryCommentModel1(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                List<DryCommentModel> list = new ArrayList<DryCommentModel>();
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString(APIKey.dataKey);
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                JSONArray jsonArray = CommonUtils.stringToJsonArray(dataString);
                if (jsonArray != null && jsonArray.length() > 0){
                    for (int i = 0; i < jsonArray.length(); i++){
                        Gson mgson = new Gson();
                        String string = jsonArray.getString(i);
                        DryCommentModel model = mgson.fromJson(
                                string, DryCommentModel.class);
                        if (model.getReplycount() > 0){
                            int count = Integer.valueOf(model.getCcount());
                            count += model.getReplycount();
                            model.setCcount(count+"");
                        }
                        list.add(model);
                    }
                }else {
                    //System.out.print("jsonArray是空的\n");
                }
                return list;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 获取数据库存储类型评论列表
     * @param jsonString
     * @return
     */
    public static List<DryCommentModel> getDryCommentModelOfDb(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                List<DryCommentModel> list = new ArrayList<DryCommentModel>();
                if (CommonUtils.isEmpty(jsonString)){
                    return null;
                }
                JSONArray jsonArray = CommonUtils.stringToJsonArray(jsonString);
                if (jsonArray != null && jsonArray.length() > 0){
                    for (int i = 0; i < jsonArray.length(); i++){
                        Gson mgson = new Gson();
                        String string = jsonArray.getString(i);
                        DryCommentModel model = mgson.fromJson(
                                string, DryCommentModel.class);
                        list.add(model);
                    }
                }else {
                    //System.out.print("jsonArray是空的\n");
                }
                return list;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 获取账户明细
     * @param jsonString
     * @return
     */
    public static List<RechargeDetailModel> getRechargeDetailModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                List<RechargeDetailModel> list = new ArrayList<RechargeDetailModel>();
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString(APIKey.dataKey);
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                JSONArray jsonArray = CommonUtils.stringToJsonArray(dataString);
                if (jsonArray != null && jsonArray.length() > 0){
                    for (int i = 0; i < jsonArray.length(); i++){
                        Gson mgson = new Gson();
                        String string = jsonArray.getString(i);
                        RechargeDetailModel model = mgson.fromJson(
                                string, RechargeDetailModel.class);
                        list.add(model);
                    }
                }else {
                    //System.out.print("jsonArray是空的\n");
                }
                return list;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 获取用户信息
     * @param jsonString
     * @return
     */
    public static UserInfoModel getUserInfoModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                Gson mgson = new Gson();
                UserInfoModel model = mgson.fromJson(
                        jsonObject.getString(APIKey.dataKey), UserInfoModel.class);
                return model;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 获取商品图文详情
     * @param jsonString
     * @return
     */
    public static List<String> getGoodsTextPic(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                Gson mgson = new Gson();
                List<String> list = CommonUtils.stringToArrayList(jsonObject.getString(APIKey.dataKey));
                return list;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 获取购物车剩余数量
     * @param jsonString
     * @return
     */
    public static List<GoodsLeftCountModel> getGoodsLeftCountModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                List<GoodsLeftCountModel> list = new ArrayList<GoodsLeftCountModel>();
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString(APIKey.dataKey);
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                JSONArray jsonArray = CommonUtils.stringToJsonArray(dataString);
                if (jsonArray != null && jsonArray.length() > 0){
                    for (int i = 0; i < jsonArray.length(); i++){
                        Gson mgson = new Gson();
                        String string = jsonArray.getString(i);
                        GoodsLeftCountModel model = mgson.fromJson(
                                string, GoodsLeftCountModel.class);
                        list.add(model);
                    }
                }else {
                    //System.out.print("jsonArray是空的\n");
                }
                return list;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 获取最大消费额数据
     * @param jsonString
     * @return
     */
    public static MaxCostModel getMaxCostModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                Gson mgson = new Gson();
                MaxCostModel model = mgson.fromJson(
                        jsonObject.getString(APIKey.countKey), MaxCostModel.class);
                return model;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 获取计算详情数据
     * @param jsonString
     * @return
     */
    public static PrizeDetailModel getPrizeDetailModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                Gson mgson = new Gson();
                PrizeDetailModel model = mgson.fromJson(
                        jsonObject.getString(APIKey.dataKey), PrizeDetailModel.class);
                return model;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 获取开奖公开数据
     * @param jsonString
     * @return
     */
    public static List<ComPrizeDataModel> getComPrizeDataModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                List<ComPrizeDataModel> list = new ArrayList<ComPrizeDataModel>();
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString(APIKey.dataKey);
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                JSONArray jsonArray = CommonUtils.stringToJsonArray(dataString);
                if (jsonArray != null && jsonArray.length() > 0){
                    for (int i = 0; i < jsonArray.length(); i++){
                        Gson mgson = new Gson();
                        String string = jsonArray.getString(i);
                        ComPrizeDataModel model = mgson.fromJson(
                                string, ComPrizeDataModel.class);
                        list.add(model);
                    }
                }else {
                    //System.out.print("jsonArray是空的\n");
                }
                return list;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 获取七牛云数据
     * @param jsonString
     * @return
     */
    public static QiniuModel getQiniuModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                Gson mgson = new Gson();
                QiniuModel model = mgson.fromJson(
                        jsonObject.getString(APIKey.dataKey), QiniuModel.class);
                return model;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    //获取聊天用户信息
    public static MsgUserInfoModel getMsgUserInfoModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                Gson mgson = new Gson();
                MsgUserInfoModel model = mgson.fromJson(
                        jsonString, MsgUserInfoModel.class);
                return model;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    //获取聊天商品信息
    public static MsgGoodsModel getMsgGoodsModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                Gson mgson = new Gson();
                MsgGoodsModel model = mgson.fromJson(
                        jsonString, MsgGoodsModel.class);
                return model;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    //获取聊天红包信息
    public static MsgRedPacketsModel getMsgRedPacketsModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                Gson mgson = new Gson();
                MsgRedPacketsModel model = mgson.fromJson(
                        jsonString, MsgRedPacketsModel.class);
                return model;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    //获取聊天名片信息
    public static MsgCardModel getMsgCardModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                Gson mgson = new Gson();
                MsgCardModel model = mgson.fromJson(
                        jsonString, MsgCardModel.class);
                return model;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 获取红包信息
     * @param jsonString
     * @return
     */
    public static RedPacketsModel getRedPacketsModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                Gson mgson = new Gson();
                RedPacketsModel model = mgson.fromJson(
                        jsonObject.getString(APIKey.dataKey), RedPacketsModel.class);
                return model;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 获取创建团信息
     * @param jsonString
     * @return
     */
    public static CreateGroupModel getCreateGroupModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                Gson mgson = new Gson();
                CreateGroupModel model = mgson.fromJson(
                        jsonObject.getString(APIKey.dataKey), CreateGroupModel.class);
                return model;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 获取开奖公开数据
     * @param jsonString
     * @return
     */
    public static List<CreateGroupModel> getUserGroups(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                List<CreateGroupModel> list = new ArrayList<CreateGroupModel>();
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString(APIKey.dataKey);
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                JSONArray jsonArray = CommonUtils.stringToJsonArray(dataString);
                if (jsonArray != null && jsonArray.length() > 0){
                    for (int i = 0; i < jsonArray.length(); i++){
                        Gson mgson = new Gson();
                        String string = jsonArray.getString(i);
                        CreateGroupModel model = mgson.fromJson(
                                string, CreateGroupModel.class);
                        list.add(model);
                    }
                }else {
                    //System.out.print("jsonArray是空的\n");
                }
                return list;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 获取查找好友信息
     * @param jsonString
     * @return
     */
    public static FindUserModel getFindUserModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                Gson mgson = new Gson();
                FindUserModel model = mgson.fromJson(
                        jsonObject.getString(APIKey.dataKey), FindUserModel.class);
                return model;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 获取小灰条消息
     * @param jsonString
     * @return
     */
    public static String getXiaoHuiTiaoModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                return jsonObject.getString(APIKey.typeKey);
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 获取创建群小灰条消息
     * @param jsonString
     * @return
     */
    public static XHTGroupCreateModel getXHTGroupCreateModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                Gson mgson = new Gson();
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                XHTGroupCreateModel model = mgson.fromJson(
                        jsonObject.getString(APIKey.dataKey), XHTGroupCreateModel.class);
                return model;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 获取加人群小灰条消息
     * @param jsonString
     * @return
     */
    public static XHTGroupJoinModel getXHTGroupJoinModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                Gson mgson = new Gson();
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                XHTGroupJoinModel model = mgson.fromJson(
                        jsonObject.getString(APIKey.dataKey), XHTGroupJoinModel.class);
                return model;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 获取群信息
     * @param jsonString
     * @return
     */
    public static GroupInfoModel getGroupInfoModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                Gson mgson = new Gson();
                GroupInfoModel model = mgson.fromJson(
                        jsonObject.getString(APIKey.dataKey), GroupInfoModel.class);
                return model;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 获取谁加入APP
     * @param jsonString
     * @return
     */
    public static List<GetJoinUserModel> getGetJoinUserModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                List<GetJoinUserModel> list = new ArrayList<GetJoinUserModel>();
                JSONArray jsonArray = CommonUtils.stringToJsonArray(jsonString);
                if (jsonArray != null && jsonArray.length() > 0){
                    for (int i = 0; i < jsonArray.length(); i++){
                        Gson mgson = new Gson();
                        String string = jsonArray.getString(i);
                        GetJoinUserModel model = mgson.fromJson(
                                string, GetJoinUserModel.class);
                        list.add(model);
                    }
                }else {
                    //System.out.print("jsonArray是空的\n");
                }
                return list;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 获取红包状态
     * @param jsonString
     * @return
     */
    public static RedStateModel getRedStateModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                Gson mgson = new Gson();
                RedStateModel model = mgson.fromJson(
                        jsonObject.getString(APIKey.dataKey), RedStateModel.class);
                return model;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 获取红包详情
     * @param jsonString
     * @return
     */
    public static RedDetailModel getRedDetailModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                Gson mgson = new Gson();
                RedDetailModel model = mgson.fromJson(
                        jsonObject.getString(APIKey.dataKey), RedDetailModel.class);
                return model;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 获取红包记录
     * @param jsonString
     * @return
     */
    public static List<RedRecordModel> getRedRecordModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                List<RedRecordModel> list = new ArrayList<RedRecordModel>();
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString(APIKey.detailKey);
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                JSONArray jsonArray = CommonUtils.stringToJsonArray(dataString);
                if (jsonArray != null && jsonArray.length() > 0){
                    for (int i = 0; i < jsonArray.length(); i++){
                        Gson mgson = new Gson();
                        String string = jsonArray.getString(i);
                        RedRecordModel model = mgson.fromJson(
                                string, RedRecordModel.class);
                        list.add(model);
                    }
                }else {
                    //System.out.print("jsonArray是空的\n");
                }
                return list;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 获取红包记录
     * @param jsonString
     * @return
     */
    public static List<RedRecordModel> getRedRecordModelWithData(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                List<RedRecordModel> list = new ArrayList<RedRecordModel>();
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString(APIKey.dataKey);
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                JSONArray jsonArray = CommonUtils.stringToJsonArray(dataString);
                if (jsonArray != null && jsonArray.length() > 0){
                    for (int i = 0; i < jsonArray.length(); i++){
                        Gson mgson = new Gson();
                        String string = jsonArray.getString(i);
                        RedRecordModel model = mgson.fromJson(
                                string, RedRecordModel.class);
                        list.add(model);
                    }
                }else {
                    //System.out.print("jsonArray是空的\n");
                }
                return list;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 获取验证码
     * @param jsonString
     * @return
     */
    public static GetCodeModel getCodeModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                Gson mgson = new Gson();
                GetCodeModel model = mgson.fromJson(
                        jsonObject.getString(APIKey.dataKey), GetCodeModel.class);
                return model;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 获取地址列表
     * @param jsonString
     * @return
     */
    public static List<AddressListModel> getAddressListModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                List<AddressListModel> list = new ArrayList<AddressListModel>();
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString(APIKey.dataKey);
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                JSONArray jsonArray = CommonUtils.stringToJsonArray(dataString);
                if (jsonArray != null && jsonArray.length() > 0){
                    for (int i = 0; i < jsonArray.length(); i++){
                        Gson mgson = new Gson();
                        String string = jsonArray.getString(i);
                        AddressListModel model = mgson.fromJson(
                                string, AddressListModel.class);
                        list.add(model);
                    }
                }else {
                    //System.out.print("jsonArray是空的\n");
                }
                return list;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 获取推荐内容
     * @param jsonString
     * @return
     */
    public static String getNotifyContent(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                return jsonObject.getString(APIKey.contentKey);
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 获取地址模型
     * @param jsonString
     * @return
     */
    public static AddressModel getAddressModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                Gson mgson = new Gson();
                AddressModel model = mgson.fromJson(
                        jsonObject.getString(APIKey.dataKey), AddressModel.class);
                return model;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * android版本
     * @param jsonString
     * @return
     */
    public static ApkModel getApkModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                Gson mgson = new Gson();
                ApkModel model = mgson.fromJson(
                        jsonObject.getString(APIKey.dataKey), ApkModel.class);
                return model;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 申请加入团
     * @param jsonString
     * @return
     */
    public static JoinGroupModel getJoinGroupModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                Gson mgson = new Gson();
                JoinGroupModel model = mgson.fromJson(
                        jsonString, JoinGroupModel.class);
                return model;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 红包退款
     * @param jsonString
     * @return
     */
    public static RedBackModel getRedBackModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                Gson mgson = new Gson();
                RedBackModel model = mgson.fromJson(
                        jsonString, RedBackModel.class);
                return model;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 生活圈审核
     * @param jsonString
     * @return
     */
    public static LifeResultModel getLifeResultModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                Gson mgson = new Gson();
                LifeResultModel model = mgson.fromJson(
                        jsonString, LifeResultModel.class);
                return model;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 获取绑定验证码类型
     * @param jsonString
     * @return
     */
    public static BDCodeModel getBDCodeModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                Gson mgson = new Gson();
                BDCodeModel model = mgson.fromJson(
                        jsonObject.getString(APIKey.dataKey), BDCodeModel.class);
                return model;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 判断好友是不是直接添加成功了
     * @param jsonString
     * @return
     */
    public static boolean isDirectAddFriend(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                if (CommonUtils.isEmpty(jsonObject.getString(APIKey.dataKey))){
                    return false;
                }else {
                    return true;
                }
            }catch (Exception e){
                return false;
            }
        }
        return false;
    }

    /**
     * 获取图片表情
     * @param jsonString
     * @return
     */
    public static List<PicdbModel> getPicdbModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                List<PicdbModel> list = new ArrayList<PicdbModel>();
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString(APIKey.dataKey);
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                JSONArray jsonArray = CommonUtils.stringToJsonArray(dataString);
                if (jsonArray != null && jsonArray.length() > 0){
                    for (int i = 0; i < jsonArray.length(); i++){
                        //System.out.print("jsonArray.get(i)="+jsonArray.getString(i)+"\n");
                        Gson mgson = new Gson();
                        String string = jsonArray.getString(i);
                        //System.out.print("string="+string+"\n");
                        PicdbModel model = mgson.fromJson(
                                string, PicdbModel.class);
                        list.add(model);
                    }
                }else {
                    //System.out.print("jsonArray是空的\n");
                }
                return list;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 支付信息模型
     * @param jsonString
     * @return
     */
    public static PayWayModel getPayWayModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                Gson mgson = new Gson();
                PayWayModel model = mgson.fromJson(
                        jsonObject.getString(APIKey.dataKey), PayWayModel.class);
                return model;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 京东支付信息
     * @param jsonString
     * @return
     */
    public static JDPayInfoModel getJDPayInfoModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                Gson mgson = new Gson();
                JDPayInfoModel model = mgson.fromJson(
                        jsonObject.getString(APIKey.dataKey), JDPayInfoModel.class);
                return model;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 生活圈列表模型
     * @param jsonString
     * @return
     */
    public static List<LifeListModel> getLifeListModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                List<LifeListModel> list = new ArrayList<LifeListModel>();
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString(APIKey.dataKey);
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                JSONArray jsonArray = CommonUtils.stringToJsonArray(dataString);
                if (jsonArray != null && jsonArray.length() > 0){
                    for (int i = 0; i < jsonArray.length(); i++){
                        Gson mgson = new Gson();
                        String string = jsonArray.getString(i);
                        LifeListModel model = mgson.fromJson(
                                string, LifeListModel.class);
                        list.add(model);
                    }
                }else {
                    //System.out.print("jsonArray是空的\n");
                }
                return list;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 生活圈推荐轮播
     * @param jsonString
     * @return
     */
    public static List<LifeListModel> getHotLifeListModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                List<LifeListModel> list = new ArrayList<LifeListModel>();
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString(APIKey.detailKey);
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                JSONArray jsonArray = CommonUtils.stringToJsonArray(dataString);
                if (jsonArray != null && jsonArray.length() > 0){
                    for (int i = 0; i < jsonArray.length(); i++){
                        Gson mgson = new Gson();
                        String string = jsonArray.getString(i);
                        LifeListModel model = mgson.fromJson(
                                string, LifeListModel.class);
                        list.add(model);
                    }
                }else {
                    //System.out.print("jsonArray是空的\n");
                }
                return list;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 生活圈详情
     * @param jsonString
     * @return
     */
    public static LifeDetailModel getLifeDetailModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                Gson mgson = new Gson();
                LifeDetailModel model = mgson.fromJson(
                        jsonObject.getString(APIKey.dataKey), LifeDetailModel.class);
                return model;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 生活圈内容
     * @param jsonString
     * @return
     */
    public static List<LifeContentModel> getLifeContentModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                List<LifeContentModel> list = new ArrayList<LifeContentModel>();
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);

                String dataString = jsonObject.getString(APIKey.contentKey);
                //System.out.print("dataString="+dataString+"\n");
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                JSONObject jsonData = CommonUtils.stringToJson(dataString);
                //System.out.print("jsonData="+jsonData.getString(APIKey.carouselfigureKey)+"\n");
                JSONArray jsonArray = CommonUtils.stringToJsonArray(jsonData.getString(APIKey.detailKey));

                /*
                String dataString = jsonObject.getString(APIKey.detailKey);
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                JSONArray jsonArray = CommonUtils.stringToJsonArray(dataString);
                */

                if (jsonArray != null && jsonArray.length() > 0){
                    for (int i = 0; i < jsonArray.length(); i++){
                        Gson mgson = new Gson();
                        String string = jsonArray.getString(i);
                        LifeContentModel model = mgson.fromJson(
                                string, LifeContentModel.class);
                        list.add(model);
                    }
                }else {
                    //System.out.print("jsonArray是空的\n");
                }
                return list;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * http请求通用模型
     * @param jsonString
     * @return
     */
    public static DryCommentModel getDryCommentContent(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);

                String dataString = jsonObject.getString(APIKey.dataKey);
                //System.out.print("dataString="+dataString+"\n");
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                Gson mgson = new Gson();
                DryCommentModel model = mgson.fromJson(
                        dataString, DryCommentModel.class);
                return model;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 获取生活圈详情评论列表
     * @param jsonString
     * @return
     */
    public static List<DryCommentModel> getLifeDetailCommentModel1(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                List<DryCommentModel> list = new ArrayList<DryCommentModel>();
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);

                String dataString = jsonObject.getString(APIKey.contentKey);
                //System.out.print("dataString="+dataString+"\n");
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                JSONObject jsonData = CommonUtils.stringToJson(dataString);
                //System.out.print("jsonData="+jsonData.getString(APIKey.carouselfigureKey)+"\n");
                JSONArray jsonArray = CommonUtils.stringToJsonArray(jsonData.getString(APIKey.commentKey));
                if (jsonArray != null && jsonArray.length() > 0){
                    for (int i = 0; i < jsonArray.length(); i++){
                        Gson mgson = new Gson();
                        String string = jsonArray.getString(i);
                        DryCommentModel model = mgson.fromJson(
                                string, DryCommentModel.class);
                        list.add(model);
                    }
                }else {
                    //System.out.print("jsonArray是空的\n");
                }
                return list;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }


    /**
     * 生活圈打赏列表
     * @param jsonString
     * @return
     */
    public static List<LifeRewardModel> getLifeRewardModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                List<LifeRewardModel> list = new ArrayList<LifeRewardModel>();
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString(APIKey.dataKey);
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                JSONArray jsonArray = CommonUtils.stringToJsonArray(dataString);
                if (jsonArray != null && jsonArray.length() > 0){
                    for (int i = 0; i < jsonArray.length(); i++){
                        Gson mgson = new Gson();
                        String string = jsonArray.getString(i);
                        LifeRewardModel model = mgson.fromJson(
                                string, LifeRewardModel.class);
                        list.add(model);
                    }
                }else {
                    //System.out.print("jsonArray是空的\n");
                }
                return list;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 关注及粉丝列表
     * @param jsonString
     * @return
     */
    public static List<LikeModel> getLikeModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                List<LikeModel> list = new ArrayList<LikeModel>();
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString(APIKey.dataKey);
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                JSONArray jsonArray = CommonUtils.stringToJsonArray(dataString);
                if (jsonArray != null && jsonArray.length() > 0){
                    for (int i = 0; i < jsonArray.length(); i++){
                        Gson mgson = new Gson();
                        String string = jsonArray.getString(i);
                        LikeModel model = mgson.fromJson(
                                string, LikeModel.class);
                        list.add(model);
                    }
                }else {
                    //System.out.print("jsonArray是空的\n");
                }
                return list;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 收藏列表
     * @param jsonString
     * @return
     */
    public static List<MyLikeModel> getMyLikeModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                List<MyLikeModel> list = new ArrayList<MyLikeModel>();
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString(APIKey.dataKey);
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                JSONArray jsonArray = CommonUtils.stringToJsonArray(dataString);
                if (jsonArray != null && jsonArray.length() > 0){
                    for (int i = 0; i < jsonArray.length(); i++){
                        Gson mgson = new Gson();
                        String string = jsonArray.getString(i);
                        MyLikeModel model = mgson.fromJson(
                                string, MyLikeModel.class);
                        list.add(model);
                    }
                }else {
                    //System.out.print("jsonArray是空的\n");
                }
                return list;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 商品轮播商品
     * @param jsonString
     * @return
     */
    public static List<GoodsHomeModel> getGoodsHomeModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                List<GoodsHomeModel> list = new ArrayList<>();
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString(APIKey.dataKey);
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                JSONObject jsonData = CommonUtils.stringToJson(dataString);
                //System.out.print("jsonData="+jsonData.getString(APIKey.carouselfigureKey)+"\n");
                JSONArray jsonArray = CommonUtils.stringToJsonArray(jsonData.getString(APIKey.recommendKey));
                if (jsonArray != null && jsonArray.length() > 0){
                    for (int i = 0; i < jsonArray.length(); i++){
                        //System.out.print("jsonArray.get(i)="+jsonArray.getString(i)+"\n");
                        Gson mgson = new Gson();
                        String string = jsonArray.getString(i);
                        //System.out.print("string="+string+"\n");
                        GoodsHomeModel model = mgson.fromJson(
                                string, GoodsHomeModel.class);
                        list.add(model);
                    }
                }else {
                    //System.out.print("jsonArray是空的\n");
                }
                return list;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 商品类型
     * @param jsonString
     * @return
     */
    public static List<GoodsHomeModel> getGoodsType(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                List<GoodsHomeModel> list = new ArrayList<>();
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString(APIKey.dataKey);
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                JSONObject jsonData = CommonUtils.stringToJson(dataString);
                //System.out.print("jsonData="+jsonData.getString(APIKey.carouselfigureKey)+"\n");
                JSONArray jsonArray = CommonUtils.stringToJsonArray(jsonData.getString(APIKey.typeKey));
                if (jsonArray != null && jsonArray.length() > 0){
                    for (int i = 0; i < jsonArray.length(); i++){
                        //System.out.print("jsonArray.get(i)="+jsonArray.getString(i)+"\n");
                        Gson mgson = new Gson();
                        String string = jsonArray.getString(i);
                        //System.out.print("string="+string+"\n");
                        GoodsHomeModel model = mgson.fromJson(
                                string, GoodsHomeModel.class);
                        list.add(model);
                    }
                }else {
                    //System.out.print("jsonArray是空的\n");
                }
                return list;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 商品推荐列表
     * @param jsonString
     * @return
     */
    public static List<GoodsHomeModel> getMiaoShaList(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                List<GoodsHomeModel> list = new ArrayList<>();
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString(APIKey.dataKey);
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                JSONObject jsonData = CommonUtils.stringToJson(dataString);
                //System.out.print("jsonData="+jsonData.getString(APIKey.carouselfigureKey)+"\n");
                JSONArray jsonArray = CommonUtils.stringToJsonArray(jsonData.getString("miaosha"));
                if (jsonArray != null && jsonArray.length() > 0){
                    for (int i = 0; i < jsonArray.length(); i++){
                        //System.out.print("jsonArray.get(i)="+jsonArray.getString(i)+"\n");
                        Gson mgson = new Gson();
                        String string = jsonArray.getString(i);
                        //System.out.print("string="+string+"\n");
                        GoodsHomeModel model = mgson.fromJson(
                                string, GoodsHomeModel.class);
                        list.add(model);
                    }
                }else {
                    //System.out.print("jsonArray是空的\n");
                }
                return list;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 商品推荐列表
     * @param jsonString
     * @return
     */
    public static List<GoodsHomeModel> getGoodsHomeList(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                List<GoodsHomeModel> list = new ArrayList<>();
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString(APIKey.dataKey);
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                JSONObject jsonData = CommonUtils.stringToJson(dataString);
                //System.out.print("jsonData="+jsonData.getString(APIKey.carouselfigureKey)+"\n");
                JSONArray jsonArray = CommonUtils.stringToJsonArray(jsonData.getString("goods"));
                if (jsonArray != null && jsonArray.length() > 0){
                    for (int i = 0; i < jsonArray.length(); i++){
                        //System.out.print("jsonArray.get(i)="+jsonArray.getString(i)+"\n");
                        Gson mgson = new Gson();
                        String string = jsonArray.getString(i);
                        //System.out.print("string="+string+"\n");
                        GoodsHomeModel model = mgson.fromJson(
                                string, GoodsHomeModel.class);
                        list.add(model);
                    }
                }else {
                    //System.out.print("jsonArray是空的\n");
                }
                return list;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 转转购列表
     * @param jsonString
     * @return
     */
    public static List<ZZGListModel> getZZGListModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                List<ZZGListModel> list = new ArrayList<ZZGListModel>();
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString(APIKey.dataKey);
                //System.out.print("dataString="+dataString+"\n");
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                JSONObject jsonData = CommonUtils.stringToJson(dataString);
                //System.out.print("data="+jsonData.getString(APIKey.dataKey)+"\n");
                JSONArray jsonArray = CommonUtils.stringToJsonArray(jsonData.getString(APIKey.dataKey));
                if (jsonArray != null && jsonArray.length() > 0){
                    for (int i = 0; i < jsonArray.length(); i++){
                        //System.out.print("jsonArray.get(i)="+jsonArray.getString(i)+"\n");
                        Gson mgson = new Gson();
                        String string = jsonArray.getString(i);
                        System.out.print(i+"string="+string+"\n");
                        ZZGListModel model = mgson.fromJson(
                                string, ZZGListModel.class);
                        list.add(model);
                    }
                }else {
                    //System.out.print("jsonArray是空的\n");
                }
                return list;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }



    /**
     * 转转购推荐列表
     * @param jsonString
     * @return
     */
    public static List<RecommendModel> getZZGRecommendModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                List<RecommendModel> list = new ArrayList<RecommendModel>();
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString(APIKey.recommendKey);
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                JSONArray jsonArray = CommonUtils.stringToJsonArray(dataString);
                if (jsonArray != null && jsonArray.length() > 0){
                    for (int i = 0; i < jsonArray.length(); i++){
                        Gson mgson = new Gson();
                        String string = jsonArray.getString(i);
                        RecommendModel model = mgson.fromJson(
                                string, RecommendModel.class);
                        list.add(model);
                    }
                }else {
                    //System.out.print("jsonArray是空的\n");
                }
                return list;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 转转购状态
     * @param jsonString
     * @return
     */
    public static ZZGStateModel getZZGStateModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                Gson mgson = new Gson();
                ZZGStateModel model = mgson.fromJson(
                        jsonObject.getString(APIKey.dataKey), ZZGStateModel.class);
                return model;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }


    //
    /**
     * WordinfoModel
     * @param jsonString
     * @return
     */
    public static WordinfoModel getWordinfoModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                JSONObject json = CommonUtils.stringToJson(jsonObject.getString("data"));
                Gson mgson = new Gson();
                WordinfoModel model = mgson.fromJson(
                        json.getString("wordinfo"), WordinfoModel.class);
                return model;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }


    /**
     * WordUserinfoModel
     * @param jsonString
     * @return
     */
    public static WordUserinfoModel getWordUserinfoModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                JSONObject json = CommonUtils.stringToJson(jsonObject.getString("data"));
                Gson mgson = new Gson();
                WordUserinfoModel model = mgson.fromJson(
                        json.getString("userinfo"), WordUserinfoModel.class);
                return model;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }
    public static WordlistModel getWordModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                JSONObject json = CommonUtils.stringToJson(jsonObject.getString("data"));
                Gson mgson = new Gson();
                WordlistModel model = mgson.fromJson(
                        json.getString("wordinfo"), WordlistModel.class);
                return model;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    public static WordUserinfoModel getWordUserinfoModelOfCancel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                JSONObject json = CommonUtils.stringToJson(jsonObject.getString("data"));
                Gson mgson = new Gson();
                WordUserinfoModel model = mgson.fromJson(
                        json.getString("userinfo"), WordUserinfoModel.class);
                return model;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * WordUserinfoModel
     * @param jsonString
     * @return
     */
    public static GuessWordAnswerModel getGuessWordAnswerModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                JSONObject json = CommonUtils.stringToJson(jsonObject.getString("data"));
                Gson mgson = new Gson();
                GuessWordAnswerModel model = mgson.fromJson(
                        json.getString("wordinfo"), GuessWordAnswerModel.class);
                return model;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * WordUserinfoModel
     * @param jsonString
     * @return
     */
    public static GuessAnswerTipModel getGuessAnswerTipModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                Gson mgson = new Gson();
                GuessAnswerTipModel model = mgson.fromJson(
                        jsonObject.getString("data"), GuessAnswerTipModel.class);
                return model;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * WordUserinfoModel
     * @param jsonString
     * @return
     */
    public static JSONArray getCancleWordInfo(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String data = jsonObject.getString(APIKey.dataKey);
                JSONObject json = CommonUtils.stringToJson(data);
                JSONArray jsonArray = CommonUtils.stringToJsonArray(json.getString("wordinfo"));
                //JSONArray list =  json.getJSONArray("wordinfo");
                return jsonArray;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }


    //成语消消信息列表
    public static List<WordlistModel> getWordlistModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                List<WordlistModel> list = new ArrayList<WordlistModel>();
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString(APIKey.dataKey);
                //System.out.print("dataString="+dataString+"\n");
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                JSONObject jsonData = CommonUtils.stringToJson(dataString);
                //System.out.print("data="+jsonData.getString(APIKey.dataKey)+"\n");
                JSONArray jsonArray = CommonUtils.stringToJsonArray(jsonData.getString("wordlist"));
                if (jsonArray != null && jsonArray.length() > 0){
                    for (int i = 0; i < jsonArray.length(); i++){
                        //System.out.print("jsonArray.get(i)="+jsonArray.getString(i)+"\n");
                        Gson mgson = new Gson();
                        String string = jsonArray.getString(i);
                        System.out.print(i+"string="+string+"\n");
                        WordlistModel model = mgson.fromJson(
                                string, WordlistModel.class);
                        list.add(model);
                    }
                }else {
                    //System.out.print("jsonArray是空的\n");
                }
                return list;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 获取排名
     * @param jsonString
     * @return
     */
    public static List<GameRangeModel> getGameRangeModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                List<GameRangeModel> list = new ArrayList<>();
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString(APIKey.dataKey);
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                JSONArray jsonArray = CommonUtils.stringToJsonArray(dataString);
                if (jsonArray != null && jsonArray.length() > 0){
                    for (int i = 0; i < jsonArray.length(); i++){
                        //System.out.print("jsonArray.get(i)="+jsonArray.getString(i)+"\n");
                        Gson mgson = new Gson();
                        String string = jsonArray.getString(i);
                        //System.out.print("string="+string+"\n");
                        GameRangeModel model = mgson.fromJson(
                                string, GameRangeModel.class);
                        list.add(model);
                    }
                }else {
                    //System.out.print("jsonArray是空的\n");
                }
                return list;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 获取排名
     * @param jsonString
     * @return
     */
    public static MyRangeModel myRangeModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString("myrange");
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                Gson mgson = new Gson();
                MyRangeModel model = mgson.fromJson(
                        dataString, MyRangeModel.class);
                return model;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * WordUserinfoModel
     * @param jsonString
     * @return
     */
    public static GameTimeOutModel getGameTimeOutModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                Gson mgson = new Gson();
                GameTimeOutModel model = mgson.fromJson(
                        jsonObject.getString("data"), GameTimeOutModel.class);
                return model;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 获取广告
     * @param jsonString
     * @return
     */
    public static List<AdvModel> getAdvModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                List<AdvModel> list = new ArrayList<>();
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString("data");
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                JSONArray jsonArray = CommonUtils.stringToJsonArray(dataString);
                if (jsonArray != null && jsonArray.length() > 0){
                    for (int i = 0; i < jsonArray.length(); i++){
                        //System.out.print("jsonArray.get(i)="+jsonArray.getString(i)+"\n");
                        Gson mgson = new Gson();
                        String string = jsonArray.getString(i);
                        //System.out.print("string="+string+"\n");
                        AdvModel model = mgson.fromJson(
                                string, AdvModel.class);
                        list.add(model);
                    }
                }else {
                    //System.out.print("jsonArray是空的\n");
                }
                return list;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 获取首页数据
     * @param jsonString
     * @return
     */
    public static List<HomeDataModel> getHomeDataModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                List<HomeDataModel> list = new ArrayList<>();
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString(APIKey.dataKey);
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                JSONArray jsonArray = CommonUtils.stringToJsonArray(dataString);
                if (jsonArray != null && jsonArray.length() > 0){
                    for (int i = 0; i < jsonArray.length(); i++){
                        //System.out.print("jsonArray.get(i)="+jsonArray.getString(i)+"\n");
                        Gson mgson = new Gson();
                        String string = jsonArray.getString(i);
                        //System.out.print("string="+string+"\n");
                        HomeDataModel model = mgson.fromJson(
                                string, HomeDataModel.class);
                        list.add(model);
                    }
                }else {
                    //System.out.print("jsonArray是空的\n");
                }
                return list;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 获取pk菜单页分享信息
     * @param jsonString
     * @return
     */
    public static PKShareModel getPKShareModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString("data");
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                jsonObject = CommonUtils.stringToJson(dataString);
                String shareString = jsonObject.getString("share");
                if (CommonUtils.isEmpty(shareString)){
                    return null;
                }
                Gson mgson = new Gson();
                PKShareModel model = mgson.fromJson(
                        shareString, PKShareModel.class);
                return model;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 获取pk用户信息
     * @param jsonString
     * @return
     */
    public static PKUserModel getPKUserModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString("data");
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                jsonObject = CommonUtils.stringToJson(dataString);
                String shareString = jsonObject.getString("userdao");
                if (CommonUtils.isEmpty(shareString)){
                    return null;
                }
                Gson mgson = new Gson();
                PKUserModel model = mgson.fromJson(
                        shareString, PKUserModel.class);
                return model;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 获取pk用户信息
     * @param jsonString
     * @return
     */
    public static PKUserModel getAnotherPKUserModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString("data");
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                jsonObject = CommonUtils.stringToJson(dataString);
                String shareString = jsonObject.getString("pkuser");
                if (CommonUtils.isEmpty(shareString)){
                    return null;
                }
                Gson mgson = new Gson();
                PKUserModel model = mgson.fromJson(
                        shareString, PKUserModel.class);
                return model;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 获取PK菜单数据
     * @param jsonString
     * @return
     */
    public static List<PKMenuModel> getPKMenuModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                List<PKMenuModel> list = new ArrayList<>();
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString(APIKey.dataKey);
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                jsonObject = CommonUtils.stringToJson(dataString);
                String menuString = jsonObject.getString("menu");
                if (CommonUtils.isEmpty(menuString)){
                    return null;
                }
                JSONArray jsonArray = CommonUtils.stringToJsonArray(menuString);
                if (jsonArray != null && jsonArray.length() > 0){
                    for (int i = 0; i < jsonArray.length(); i++){
                        //System.out.print("jsonArray.get(i)="+jsonArray.getString(i)+"\n");
                        Gson mgson = new Gson();
                        String string = jsonArray.getString(i);
                        //System.out.print("string="+string+"\n");
                        PKMenuModel model = mgson.fromJson(
                                string, PKMenuModel.class);
                        list.add(model);
                    }
                }else {
                    //System.out.print("jsonArray是空的\n");
                }
                return list;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 获取pk房间信息
     * @param jsonString
     * @return
     */
    public static PKRoomModel getPKRoomModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString("data");
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                jsonObject = CommonUtils.stringToJson(dataString);
                String shareString = jsonObject.getString("pkroom");
                if (CommonUtils.isEmpty(shareString)){
                    return null;
                }
                Gson mgson = new Gson();
                PKRoomModel model = mgson.fromJson(
                        shareString, PKRoomModel.class);
                return model;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 获取pk规则信息
     * @param jsonString
     * @return
     */
    public static PKRuleModel getPKRuleModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString("data");
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                jsonObject = CommonUtils.stringToJson(dataString);
                String shareString = jsonObject.getString("rule");
                if (CommonUtils.isEmpty(shareString)){
                    return null;
                }
                Gson mgson = new Gson();
                PKRuleModel model = mgson.fromJson(
                        shareString, PKRuleModel.class);
                return model;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 获取PK题目数据
     * @param jsonString
     * @return
     */
    public static List<PKSubjectModel> getPKSubjectModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                List<PKSubjectModel> list = new ArrayList<>();
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString(APIKey.dataKey);
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                jsonObject = CommonUtils.stringToJson(dataString);
                String menuString = jsonObject.getString("subject");
                if (CommonUtils.isEmpty(menuString)){
                    return null;
                }
                JSONArray jsonArray = CommonUtils.stringToJsonArray(menuString);
                if (jsonArray != null && jsonArray.length() > 0){
                    for (int i = 0; i < jsonArray.length(); i++){
                        //System.out.print("jsonArray.get(i)="+jsonArray.getString(i)+"\n");
                        Gson mgson = new Gson();
                        String string = jsonArray.getString(i);
                        //System.out.print("string="+string+"\n");
                        PKSubjectModel model = mgson.fromJson(
                                string, PKSubjectModel.class);
                        list.add(model);
                    }
                }else {
                    //System.out.print("jsonArray是空的\n");
                }
                return list;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 获取pk用户信息
     * @param jsonString
     * @return
     */
    public static PKUserModel getPKRoleUserModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString("data");
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                jsonObject = CommonUtils.stringToJson(dataString);
                String shareString = jsonObject.getString("roleuser");
                if (CommonUtils.isEmpty(shareString)){
                    return null;
                }
                Gson mgson = new Gson();
                PKUserModel model = mgson.fromJson(
                        shareString, PKUserModel.class);
                return model;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 获取PK题目数据
     * @param jsonString
     * @return
     */
    public static List<PKAModel> getPKAModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                List<PKAModel> list = new ArrayList<>();
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString(APIKey.dataKey);
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                jsonObject = CommonUtils.stringToJson(dataString);
                String menuString = jsonObject.getString("pka");
                if (CommonUtils.isEmpty(menuString)){
                    return null;
                }
                JSONArray jsonArray = CommonUtils.stringToJsonArray(menuString);
                if (jsonArray != null && jsonArray.length() > 0){
                    for (int i = 0; i < jsonArray.length(); i++){
                        //System.out.print("jsonArray.get(i)="+jsonArray.getString(i)+"\n");
                        Gson mgson = new Gson();
                        String string = jsonArray.getString(i);
                        //System.out.print("string="+string+"\n");
                        PKAModel model = mgson.fromJson(
                                string, PKAModel.class);
                        list.add(model);
                    }
                }else {
                    //System.out.print("jsonArray是空的\n");
                }
                return list;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 获取pk通知信息
     * @param jsonString
     * @return
     */
    public static PKMsgModel getPKMsgModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                Gson mgson = new Gson();
                PKMsgModel model = mgson.fromJson(
                        jsonString, PKMsgModel.class);
                return model;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 获取pk结果信息
     * @param jsonString
     * @return
     */
    public static PKResultModel getPKResultModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString("data");
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                Gson mgson = new Gson();
                PKResultModel model = mgson.fromJson(
                        dataString, PKResultModel.class);
                return model;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 获取pk用户信息
     * @param jsonString
     * @return
     */
    public static PKResultUserInfo getacceptuserpkinfo(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString("data");
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                jsonObject = CommonUtils.stringToJson(dataString);
                String shareString = jsonObject.getString("acceptuserpkinfo");
                if (CommonUtils.isEmpty(shareString)){
                    return null;
                }
                Gson mgson = new Gson();
                PKResultUserInfo model = mgson.fromJson(
                        shareString, PKResultUserInfo.class);
                return model;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 获取pk用户信息
     * @param jsonString
     * @return
     */
    public static PKResultUserInfo getsenduserpkinfo(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString("data");
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                jsonObject = CommonUtils.stringToJson(dataString);
                String shareString = jsonObject.getString("senduserpkinfo");
                if (CommonUtils.isEmpty(shareString)){
                    return null;
                }
                Gson mgson = new Gson();
                PKResultUserInfo model = mgson.fromJson(
                        shareString, PKResultUserInfo.class);
                return model;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 获取逻辑推理信息
     * @param jsonString
     * @return
     */
    public static LogicalSubjectModel getLogicalSubjectModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString("data");
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                jsonObject = CommonUtils.stringToJson(dataString);
                String shareString = jsonObject.getString("wordinfo");
                if (CommonUtils.isEmpty(shareString)){
                    return null;
                }
                Gson mgson = new Gson();
                LogicalSubjectModel model = mgson.fromJson(
                        shareString, LogicalSubjectModel.class);
                return model;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    public static int getLogicalGoldCount(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString("data");
                if (CommonUtils.isEmpty(dataString)){
                    return 0;
                }
                jsonObject = CommonUtils.stringToJson(dataString);
                return jsonObject.getInt("goldcount");
            }catch (Exception e){
                return 0;
            }
        }
        return 0;
    }

    /**
     * 用户微句列表
     * @param jsonString
     * @return
     */
    public static List<LangInfoModel> getUserLangInfoModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                List<LangInfoModel> list = new ArrayList<LangInfoModel>();
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString(APIKey.dataKey);
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                JSONObject j = CommonUtils.stringToJson(dataString);
                String lang = j.getString("lang");
                JSONArray jsonArray = CommonUtils.stringToJsonArray(lang);
                if (jsonArray != null && jsonArray.length() > 0){
                    for (int i = 0; i < jsonArray.length(); i++){
                        Gson mgson = new Gson();
                        String string = jsonArray.getString(i);
                        LangInfoModel model = mgson.fromJson(
                                string, LangInfoModel.class);
                        if (!CommonUtils.isEmpty(model.getImg())){
                            model.setImglist(CommonUtils.stringToArrayList(model.getImg()));
                        }
                        if (CommonUtils.isEmpty(CustomApplication.customApplication.loginModel.getToken())){
                            model.setMy(false);
                        }else {
                            if (CustomApplication.customApplication.loginModel.getUid().equals(model.getUserid())){
                                //model.setMy(true);
                                model.setMy(false);
                            }
                        }
                        model.setTime(CommonUtils.getNewChatTime((long)model.getCreatetime()*1000));
                        list.add(model);
                    }
                }else {
                    //System.out.print("jsonArray是空的\n");
                }
                return list;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    public static String getTip(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString("tip");
                if (CommonUtils.isEmpty(dataString)){
                    return "";
                }
                return dataString;
            }catch (Exception e){
                return "";
            }
        }
        return "";
    }

    /**
     * 用户微句列表
     * @param jsonString
     * @return
     */
    public static List<BookmarkModel> getClerkBookmark(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                List<BookmarkModel> list = new ArrayList<BookmarkModel>();
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString(APIKey.dataKey);
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                JSONObject j = CommonUtils.stringToJson(dataString);
                String lang = j.getString("bookmark");
                JSONArray jsonArray = CommonUtils.stringToJsonArray(lang);
                if (jsonArray != null && jsonArray.length() > 0){
                    for (int i = 0; i < jsonArray.length(); i++){
                        Gson mgson = new Gson();
                        String string = jsonArray.getString(i);
                        BookmarkModel model = mgson.fromJson(
                                string, BookmarkModel.class);
                        list.add(model);
                    }
                }else {
                    //System.out.print("jsonArray是空的\n");
                }
                return list;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 用户微句列表
     * @param jsonString
     * @return
     */
    public static List<LangInfoModel> getMyLangInfoModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                List<LangInfoModel> list = new ArrayList<LangInfoModel>();
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString(APIKey.dataKey);
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                JSONObject j = CommonUtils.stringToJson(dataString);
                String lang = j.getString("lang");
                JSONArray jsonArray = CommonUtils.stringToJsonArray(lang);
                if (jsonArray != null && jsonArray.length() > 0){
                    for (int i = 0; i < jsonArray.length(); i++){
                        Gson mgson = new Gson();
                        String string = jsonArray.getString(i);
                        LangInfoModel model = mgson.fromJson(
                                string, LangInfoModel.class);
                        if (!CommonUtils.isEmpty(model.getImg())){
                            model.setImglist(CommonUtils.stringToArrayList(model.getImg()));
                        }
                        model.setMy(true);
                        model.setTime(TimeUtils.getNewChatTime((long)model.getCreatetime()*1000));
                        list.add(model);
                    }
                }else {
                    //System.out.print("jsonArray是空的\n");
                }
                return list;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 获取微句排名
     * @param jsonString
     * @return
     */
    public static List<CircleLangModel> getCircleLangModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                List<CircleLangModel> list = new ArrayList<CircleLangModel>();
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString(APIKey.dataKey);
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                JSONArray jsonArray = CommonUtils.stringToJsonArray(dataString);
                if (jsonArray != null && jsonArray.length() > 0){
                    for (int i = 0; i < jsonArray.length(); i++){
                        Gson mgson = new Gson();
                        String string = jsonArray.getString(i);
                        CircleLangModel model = mgson.fromJson(
                                string, CircleLangModel.class);
                        list.add(model);
                    }
                }else {
                    //System.out.print("jsonArray是空的\n");
                }
                return list;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 获取用户荣誉
     * @param jsonString
     * @return
     */
    public static List<LangHonorModel> getLangHonorModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                List<LangHonorModel> list = new ArrayList<LangHonorModel>();
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString(APIKey.dataKey);
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                JSONArray jsonArray = CommonUtils.stringToJsonArray(dataString);
                if (jsonArray != null && jsonArray.length() > 0){
                    for (int i = 0; i < jsonArray.length(); i++){
                        Gson mgson = new Gson();
                        String string = jsonArray.getString(i);
                        LangHonorModel model = mgson.fromJson(
                                string, LangHonorModel.class);
                        list.add(model);
                    }
                }else {
                    //System.out.print("jsonArray是空的\n");
                }
                return list;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 微句详情
     * @param jsonString
     * @return
     */
    public static LangInfoModel getLangInfoModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                JSONObject json = CommonUtils.stringToJson(jsonObject.getString("data"));
                Gson mgson = new Gson();
                LangInfoModel model = mgson.fromJson(
                        json.getString("langinfo"), LangInfoModel.class);
                model.setTime(CommonUtils.getNewChatTime((long)model.getCreatetime()*1000));
                if (!CommonUtils.isEmpty(model.getImg())){
                    model.setImglist(CommonUtils.stringToArrayList(model.getImg()));
                }
                return model;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 获取评论内容详情
     * @param jsonString
     * @return
     */
    public static DryCommentModel getCommentModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                Gson mgson = new Gson();
                DryCommentModel model = mgson.fromJson(
                        jsonObject.getString(APIKey.dataKey), DryCommentModel.class);
                return model;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 获取历史答题
     * @param jsonString
     * @return
     */
    public static List<HistorySubjectModel> getHistorySubjectModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                List<HistorySubjectModel> list = new ArrayList<HistorySubjectModel>();
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString(APIKey.dataKey);
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                JSONArray jsonArray = CommonUtils.stringToJsonArray(dataString);
                if (jsonArray != null && jsonArray.length() > 0){
                    for (int i = 0; i < jsonArray.length(); i++){
                        Gson mgson = new Gson();
                        String string = jsonArray.getString(i);
                        HistorySubjectModel model = mgson.fromJson(
                                string, HistorySubjectModel.class);
                        list.add(model);
                    }
                }else {
                    //System.out.print("jsonArray是空的\n");
                }
                return list;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }


    /**
     * 获取微句类型
     * @param jsonString
     * @return
     */
    public static List<LangTypeModel> getLangTypeModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                List<LangTypeModel> list = new ArrayList<LangTypeModel>();
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString(APIKey.dataKey);
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                JSONObject json = CommonUtils.stringToJson(dataString);
                dataString = json.getString("second");
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                JSONArray jsonArray = CommonUtils.stringToJsonArray(dataString);
                if (jsonArray != null && jsonArray.length() > 0){
                    for (int i = 0; i < jsonArray.length(); i++){
                        Gson mgson = new Gson();
                        String string = jsonArray.getString(i);
                        LangTypeModel model = mgson.fromJson(
                                string, LangTypeModel.class);
                        list.add(model);
                    }
                }else {
                    //System.out.print("jsonArray是空的\n");
                }
                return list;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    public static List<LangTypeModel> getLangTypeModelBySearch(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                List<LangTypeModel> list = new ArrayList<LangTypeModel>();
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString(APIKey.dataKey);
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                JSONArray jsonArray = CommonUtils.stringToJsonArray(dataString);
                if (jsonArray != null && jsonArray.length() > 0){
                    for (int i = 0; i < jsonArray.length(); i++){
                        Gson mgson = new Gson();
                        String string = jsonArray.getString(i);
                        LangTypeModel model = mgson.fromJson(
                                string, LangTypeModel.class);
                        list.add(model);
                    }
                }else {
                    //System.out.print("jsonArray是空的\n");
                }
                return list;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 获取微句类型
     * @param jsonString
     * @return
     */
    public static List<LangTypeModel> getLangTypeCommon(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                List<LangTypeModel> list = new ArrayList<LangTypeModel>();
                JSONArray jsonArray = CommonUtils.stringToJsonArray(jsonString);
                if (jsonArray != null && jsonArray.length() > 0){
                    for (int i = 0; i < jsonArray.length(); i++){
                        Gson mgson = new Gson();
                        String string = jsonArray.getString(i);
                        LangTypeModel model = mgson.fromJson(
                                string, LangTypeModel.class);
                        list.add(model);
                    }
                }else {
                    //System.out.print("jsonArray是空的\n");
                }
                return list;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 获取微句一级类型
     * @param jsonString
     * @return
     */
    public static List<LangFirstTypeModel> getLangFirstTypeModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                List<LangFirstTypeModel> list = new ArrayList<LangFirstTypeModel>();
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString(APIKey.dataKey);
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                JSONObject json = CommonUtils.stringToJson(dataString);
                dataString = json.getString("first");
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                JSONArray jsonArray = CommonUtils.stringToJsonArray(dataString);
                if (jsonArray != null && jsonArray.length() > 0){
                    for (int i = 0; i < jsonArray.length(); i++){
                        Gson mgson = new Gson();
                        String string = jsonArray.getString(i);
                        LangFirstTypeModel model = mgson.fromJson(
                                string, LangFirstTypeModel.class);
                        list.add(model);
                    }
                }else {
                    //System.out.print("jsonArray是空的\n");
                }
                return list;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 获取微句搜索描述文字
     * @param jsonString
     * @return
     */
    public static String getLangSearchText(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                List<LangTypeModel> list = new ArrayList<LangTypeModel>();
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString(APIKey.titleKey);
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                return dataString;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 获取文案每日推荐标题
     * @param jsonString
     * @return
     */
    public static String getClerkTitle(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString(APIKey.titleKey);
                if (CommonUtils.isEmpty(dataString)){
                    return "每日推荐";
                }
                return dataString;
            }catch (Exception e){
                return "每日推荐";
            }
        }
        return "每日推荐";
    }

    /**
     * 获取微纸条轮播背景
     * @param jsonString
     * @return
     */
    public static String getWZTBannerBg(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString("bgUrl");
                if (CommonUtils.isEmpty(dataString)){
                    return "https://image.daydayrise.net/textbg.jpg";
                }
                return dataString;
            }catch (Exception e){
                return "https://image.daydayrise.net/textbg.jpg";
            }
        }
        return "https://image.daydayrise.net/textbg.jpg";
    }

    /**
     * 用户微句汇总信息
     * @param jsonString
     * @return
     */
    public static CircleLangModel getUserLangSimpleModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                Gson mgson = new Gson();
                CircleLangModel model = mgson.fromJson(
                        jsonObject.getString(APIKey.dataKey), CircleLangModel.class);
                return model;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    //获取关注状态
    public static CareStateModel getCareStateModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                Gson mgson = new Gson();
                CareStateModel model = mgson.fromJson(
                        jsonObject.getString(APIKey.dataKey), CareStateModel.class);
                return model;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 获取收藏列表
     * @param jsonString
     * @return
     */
    public static List<CollectModel> getCollectModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                List<CollectModel> list = new ArrayList<CollectModel>();
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString(APIKey.dataKey);
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                JSONArray jsonArray = CommonUtils.stringToJsonArray(dataString);
                if (jsonArray != null && jsonArray.length() > 0){
                    for (int i = 0; i < jsonArray.length(); i++){
                        Gson mgson = new Gson();
                        String string = jsonArray.getString(i);
                        CollectModel model = mgson.fromJson(
                                string, CollectModel.class);
                        if (!CommonUtils.isEmpty(model.getImg())){
                            model.setImglist(CommonUtils.stringToArrayList(model.getImg()));
                        }
                        list.add(model);
                    }
                }else {
                    //System.out.print("jsonArray是空的\n");
                }
                return list;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 获取收藏夹信息
     * @param jsonString
     * @return
     */
    public static BookmarkModel getBookmarkModel1(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                Gson mgson = new Gson();
                BookmarkModel model = mgson.fromJson(
                        jsonObject.getString("bookmark"), BookmarkModel.class);
                return model;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 获取轮播列表
     * @param jsonString
     * @return
     */
    public static List<BannerModel> getBannerModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                List<BannerModel> list = new ArrayList<BannerModel>();
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString(APIKey.dataKey);
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                JSONArray jsonArray = CommonUtils.stringToJsonArray(dataString);
                if (jsonArray != null && jsonArray.length() > 0){
                    for (int i = 0; i < jsonArray.length(); i++){
                        Gson mgson = new Gson();
                        String string = jsonArray.getString(i);
                        BannerModel model = mgson.fromJson(
                                string, BannerModel.class);
                        list.add(model);
                    }
                }else {
                    //System.out.print("jsonArray是空的\n");
                }
                return list;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 获取首页菜单
     * @param jsonString
     * @return
     */
    public static List<HomeMenuModel> getHomeMenuModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                List<HomeMenuModel> list = new ArrayList<HomeMenuModel>();
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString("menu");
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                JSONArray jsonArray = CommonUtils.stringToJsonArray(dataString);
                if (jsonArray != null && jsonArray.length() > 0){
                    for (int i = 0; i < jsonArray.length(); i++){
                        Gson mgson = new Gson();
                        String string = jsonArray.getString(i);
                        HomeMenuModel model = mgson.fromJson(
                                string, HomeMenuModel.class);
                        list.add(model);
                    }
                }else {
                    //System.out.print("jsonArray是空的\n");
                }
                return list;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 获取专题名称列表
     * @param jsonString
     * @return
     */
    public static List<ThirdDataNameModel> getThirdDataNameModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                List<ThirdDataNameModel> list = new ArrayList<ThirdDataNameModel>();
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString(APIKey.dataKey);
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                JSONArray jsonArray = CommonUtils.stringToJsonArray(dataString);
                if (jsonArray != null && jsonArray.length() > 0){
                    for (int i = 0; i < jsonArray.length(); i++){
                        Gson mgson = new Gson();
                        String string = jsonArray.getString(i);
                        ThirdDataNameModel model = mgson.fromJson(
                                string, ThirdDataNameModel.class);
                        list.add(model);
                    }
                }else {
                    //System.out.print("jsonArray是空的\n");
                }
                return list;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 获取专题内容列表
     * @param jsonString
     * @return
     */
    public static List<ThirdDataInfoModel> getThirdDataInfoModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                List<ThirdDataInfoModel> list = new ArrayList<ThirdDataInfoModel>();
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString(APIKey.dataKey);
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                JSONArray jsonArray = CommonUtils.stringToJsonArray(dataString);
                if (jsonArray != null && jsonArray.length() > 0){
                    for (int i = 0; i < jsonArray.length(); i++){
                        Gson mgson = new Gson();
                        String string = jsonArray.getString(i);
                        ThirdDataInfoModel model = mgson.fromJson(
                                string, ThirdDataInfoModel.class);
                        list.add(model);
                    }
                }else {
                    //System.out.print("jsonArray是空的\n");
                }
                return list;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 用户签到
     * @param jsonString
     * @return
     */
    public static UserSignModel getUserSignModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                Gson mgson = new Gson();
                UserSignModel model = mgson.fromJson(
                        jsonObject.getString("data"), UserSignModel.class);
                return model;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 通知未读消息
     * @param jsonString
     * @return
     */
    public static List<UserMsgInfoModel> getUserMsgInfoModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                List<UserMsgInfoModel> list = new ArrayList<UserMsgInfoModel>();
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString(APIKey.dataKey);
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                JSONArray jsonArray = CommonUtils.stringToJsonArray(dataString);
                if (jsonArray != null && jsonArray.length() > 0){
                    for (int i = 0; i < jsonArray.length(); i++){
                        Gson mgson = new Gson();
                        String string = jsonArray.getString(i);
                        UserMsgInfoModel model = mgson.fromJson(
                                string, UserMsgInfoModel.class);
                        list.add(model);
                    }
                }else {
                    //System.out.print("jsonArray是空的\n");
                }
                return list;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 获取意见反馈
     * @param jsonString
     * @return
     */
    public static List<FeedModel> getFeedModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                List<FeedModel> list = new ArrayList<FeedModel>();
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString(APIKey.dataKey);
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                JSONArray jsonArray = CommonUtils.stringToJsonArray(dataString);
                if (jsonArray != null && jsonArray.length() > 0){
                    for (int i = 0; i < jsonArray.length(); i++){
                        Gson mgson = new Gson();
                        String string = jsonArray.getString(i);
                        FeedModel model = mgson.fromJson(
                                string, FeedModel.class);
                        list.add(model);
                    }
                }else {
                    //System.out.print("jsonArray是空的\n");
                }
                return list;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    //获取匿名发布状态
    public static String getNoname(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString(APIKey.dataKey);
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                JSONObject json = CommonUtils.stringToJson(dataString);
                dataString = json.getString("noname");
                if (!CommonUtils.isEmpty(dataString)) {
                    return dataString;
                }else {
                    return "0";
                }
            }catch (Exception e){
                return "0";
            }
        }
        return "0";
    }

    //获取常用发布类型
    public static String getCommonLang(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString(APIKey.dataKey);
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                JSONObject json = CommonUtils.stringToJson(dataString);
                dataString = json.getString("common");
                if (!CommonUtils.isEmpty(dataString)) {
                    return dataString;
                }else {
                    return "";
                }
            }catch (Exception e){
                return "";
            }
        }
        return "";
    }

    //获取类型选择状态
    public static String gettypeselect(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString(APIKey.dataKey);
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                JSONObject json = CommonUtils.stringToJson(dataString);
                dataString = json.getString("typeselect");
                if (!CommonUtils.isEmpty(dataString)) {
                    return dataString;
                }else {
                    return "0";
                }
            }catch (Exception e){
                return "0";
            }
        }
        return "0";
    }

    //获取未读消息状态
    public static boolean getunReadState(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString(APIKey.dataKey);
                if (CommonUtils.isEmpty(dataString)){
                    return false;
                }
                JSONObject json = CommonUtils.stringToJson(dataString);
                 return json.getBoolean("unRead");
            }catch (Exception e){
                return false;
            }
        }
        return false;
    }

    //获取推送状态
    public static Boolean getPushState(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString(APIKey.dataKey);
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                JSONObject json = CommonUtils.stringToJson(dataString);
                return json.getBoolean("state");
            }catch (Exception e){
                return false;
            }
        }
        return false;
    }


    /**
     * 获取私信
     * @param jsonString
     * @return
     */
    public static List<LetterdbModel> getLetterdbModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                List<LetterdbModel> list = new ArrayList<LetterdbModel>();
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString(APIKey.dataKey);
                if (CommonUtils.isEmpty(dataString)){
                    Log.e("TAG","私信内容是空的");
                    return null;
                }
                Log.e("TAG","私信内容："+dataString);
                JSONArray jsonArray = CommonUtils.stringToJsonArray(dataString);
                if (jsonArray != null && jsonArray.length() > 0){
                    for (int i = 0; i < jsonArray.length(); i++){
                        Gson mgson = new Gson();
                        String string = jsonArray.getString(i);
                        LetterdbModel model = mgson.fromJson(
                                string, LetterdbModel.class);
                        list.add(model);
                    }
                }else {
                    //System.out.print("jsonArray是空的\n");
                    Log.e("TAG","私信jsonArray是空的");
                }
                return list;
            }catch (Exception e){
                e.printStackTrace();
                Log.e("TAG","私信异常："+e.getMessage());
                return null;
            }
        }
        return null;
    }

    //获取私信状态
    public static SXStateModel getSXStateModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString(APIKey.dataKey);
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                Gson mgson = new Gson();
                SXStateModel model = mgson.fromJson(
                        jsonObject.getString("data"), SXStateModel.class);
                return model;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    //获取私信发送状态
    public static SXSendResult getSXSendResult(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString(APIKey.dataKey);
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                Gson mgson = new Gson();
                SXSendResult model = mgson.fromJson(
                        jsonObject.getString("data"), SXSendResult.class);
                return model;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 获取私信黑名单
     * @param jsonString
     * @return
     */
    public static List<PeopleModel> getPeopleModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                List<PeopleModel> list = new ArrayList<PeopleModel>();
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString(APIKey.dataKey);
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                JSONArray jsonArray = CommonUtils.stringToJsonArray(dataString);
                if (jsonArray != null && jsonArray.length() > 0){
                    for (int i = 0; i < jsonArray.length(); i++){
                        Gson mgson = new Gson();
                        String string = jsonArray.getString(i);
                        PeopleModel model = mgson.fromJson(
                                string, PeopleModel.class);
                        list.add(model);
                    }
                }else {
                    //System.out.print("jsonArray是空的\n");
                }
                return list;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 获取发现轮播特殊背景
     * @param jsonString
     * @return
     */
    public static String getFindBannerBgUrl(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                List<LangTypeModel> list = new ArrayList<LangTypeModel>();
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString("bgUrl");
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                return dataString;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 获取微纸条列表
     * @param jsonString
     * @return
     */
    public static List<WeiShuInfoDetailModel> getWeiShuInfoDetailModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                List<WeiShuInfoDetailModel> list = new ArrayList<WeiShuInfoDetailModel>();
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString(APIKey.dataKey);
                if (CommonUtils.isEmpty(dataString)){
                    //Log.e("微纸条","数据是空的\n");
                    return null;
                }
                JSONArray jsonArray = CommonUtils.stringToJsonArray(dataString);
                if (jsonArray != null && jsonArray.length() > 0){
                    //Log.e("微纸条","拿到数据大小="+jsonArray.length()+"\n");
                    for (int i = 0; i < jsonArray.length(); i++){
                        Gson mgson = new Gson();
                        String string = jsonArray.getString(i);
                        //Log.e("微纸条","内容="+string+"\n");
                        WeiShuInfoDetailModel model = mgson.fromJson(
                                string, WeiShuInfoDetailModel.class);
                        list.add(model);
                    }
                }else {
                    //Log.e("微纸条","jsonArray是空的\n");
                    //System.out.print("jsonArray是空的\n");
                }
                return list;
            }catch (Exception e){
                //Log.e("微纸条","错误信息："+e.getMessage()+"\n");
                return null;
            }
        }
        return null;
    }

    /**
     * 获取头部微纸条列表
     * @param jsonString
     * @return
     */
    public static List<WeiShuInfoDetailModel> getWeiShuInfoDetailModelOfHeader(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                List<WeiShuInfoDetailModel> list = new ArrayList<WeiShuInfoDetailModel>();
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString("wzt");
                if (CommonUtils.isEmpty(dataString)){
                    //Log.e("微纸条","数据是空的\n");
                    return null;
                }
                JSONArray jsonArray = CommonUtils.stringToJsonArray(dataString);
                if (jsonArray != null && jsonArray.length() > 0){
                    //Log.e("微纸条","拿到数据大小="+jsonArray.length()+"\n");
                    for (int i = 0; i < jsonArray.length(); i++){
                        Gson mgson = new Gson();
                        String string = jsonArray.getString(i);
                        //Log.e("微纸条","内容="+string+"\n");
                        WeiShuInfoDetailModel model = mgson.fromJson(
                                string, WeiShuInfoDetailModel.class);
                        list.add(model);
                    }
                }else {
                    //Log.e("微纸条","jsonArray是空的\n");
                    //System.out.print("jsonArray是空的\n");
                }
                return list;
            }catch (Exception e){
                //Log.e("微纸条","错误信息："+e.getMessage()+"\n");
                return null;
            }
        }
        return null;
    }

    /**
     * 获取发现首页微纸条列表
     * @param jsonString
     * @return
     */
    public static List<WeiShuInfoDetailModel> getWeiShuFindHome(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                List<WeiShuInfoDetailModel> list = new ArrayList<WeiShuInfoDetailModel>();
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString(APIKey.dataKey);
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                JSONArray jsonArray = CommonUtils.stringToJsonArray(dataString);
                if (jsonArray != null && jsonArray.length() > 0){
                    //int index = 0;
                    for (int i = 0; i < jsonArray.length(); i++){
                        String string = jsonArray.getString(i);
                        if (CommonUtils.isEmpty(string)){
                            continue;
                        }
                        JSONObject j = CommonUtils.stringToJson(string);
                        if (j != null){
                            String type = j.getString("type");
                            String name = j.getString("name");
                            String l = j.getString("list");
                            if (!CommonUtils.isEmpty(type) && !CommonUtils.isEmpty(name) && !CommonUtils.isEmpty(l)){
                                WeiShuInfoDetailModel model = new WeiShuInfoDetailModel();
                                model.setType(Integer.valueOf(type));
                                model.setUserid("");
                                model.setTitle(name);
                                list.add(model);
                                //index += 1;
                                //补齐法
                                model = new WeiShuInfoDetailModel();
                                model.setType(Integer.valueOf(type));
                                model.setUserid("");
                                model.setTitle(name);
                                list.add(model);
                                //index += 1;
                                model = new WeiShuInfoDetailModel();
                                model.setType(Integer.valueOf(type));
                                model.setUserid("");
                                model.setTitle(name);
                                list.add(model);
                                //index += 1;
                                JSONArray array = CommonUtils.stringToJsonArray(l);
                                if (array != null && array.length() > 0){
                                    //index += array.length();
                                    for (int jj = 0; jj < array.length(); jj++){
                                        String s = array.getString(jj);
                                        if (CommonUtils.isEmpty(s)){
                                            continue;
                                        }
                                        Gson mgson = new Gson();
                                        if (type.equals("10000")){
                                            ClassifyModel classifyModel = mgson.fromJson(s, ClassifyModel.class);
                                            model = new WeiShuInfoDetailModel();
                                            model.setType(Integer.valueOf(type));
                                            model.setUserid(classifyModel.getUserid());
                                            model.setTitle(classifyModel.getClassifyName());
                                            model.setClassifyIcon(classifyModel.getIcon());
                                            model.setClassifyId(classifyModel.getClassifyId());
                                            model.setClassifyName(classifyModel.getClassifyName());
                                            model.setIcon(classifyModel.getIcon());
                                            model.setVisible(classifyModel.getVisible());
                                            model.setWeishuCount(classifyModel.getWeishuCount());
                                        }else if (type.equals("10001")){
                                            BookmarkModel bookmarkModel = mgson.fromJson(s, BookmarkModel.class);
                                            model = new WeiShuInfoDetailModel();
                                            model.setType(Integer.valueOf(type));
                                            model.setUserid(bookmarkModel.getUserid());
                                            model.setTitle(bookmarkModel.getBookmarkName());
                                            model.setBookmarkName(bookmarkModel.getBookmarkName());
                                            model.setBookmarkDetail(bookmarkModel.getBookmarkDetail());
                                            model.setBookmarkId(bookmarkModel.getBookmarkId());
                                            model.setContentCount(bookmarkModel.getContentCount());
                                            model.setVisible(bookmarkModel.getVisible());
                                            model.setUserid(bookmarkModel.getUserid());//不允许编辑
                                            model.setHeader(bookmarkModel.getHeader());
                                            model.setNickname(bookmarkModel.getNickname());
                                            model.setIcon(bookmarkModel.getIcon());
                                            model.setContentCount(bookmarkModel.getContentCount());
                                        }else {
                                            model = mgson.fromJson(
                                                    s, WeiShuInfoDetailModel.class);
                                        }
                                        list.add(model);
                                    }
                                    if (array.length() % 3 == 1){
                                        model = new WeiShuInfoDetailModel();
                                        model.setType(Integer.valueOf(type));
                                        model.setUserid("");
                                        model.setTitle(name);
                                        list.add(model);
                                        //index += 1;
                                        model = new WeiShuInfoDetailModel();
                                        model.setType(Integer.valueOf(type));
                                        model.setUserid("");
                                        model.setTitle(name);
                                        list.add(model);
                                        //index += 1;
                                    }else if (array.length() % 3 == 2){
                                        model = new WeiShuInfoDetailModel();
                                        model.setType(Integer.valueOf(type));
                                        model.setUserid("");
                                        model.setTitle(name);
                                        list.add(model);
                                        //index += 1;
                                    }
                                }
                            }
                        }
                    }
                }else {
                    //System.out.print("jsonArray是空的\n");
                }
                return list;
            }catch (Exception e){
                Log.e("TAG", "问题："+e.getLocalizedMessage());
                return null;
            }
        }
        return null;
    }

    /**
     * 获取发现首页微纸条列表
     * @param jsonString
     * @return
     */
    public static TwoTuple getWeiShuFindHomeHeader(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                List<String> list = new ArrayList<String>();
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString(APIKey.dataKey);
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                JSONArray jsonArray = CommonUtils.stringToJsonArray(dataString);
                int index = 0;
                if (jsonArray != null && jsonArray.length() > 0){
                    for (int i = 0; i < jsonArray.length(); i++){
                        String string = jsonArray.getString(i);
                        if (CommonUtils.isEmpty(string)){
                            continue;
                        }
                        JSONObject j = CommonUtils.stringToJson(string);
                        if (j != null){
                            String type = j.getString("type");
                            String name = j.getString("name");
                            String l = j.getString("list");
                            Log.e("TAG","发现标题="+name);
                            if (!CommonUtils.isEmpty(type) && !CommonUtils.isEmpty(name) && !CommonUtils.isEmpty(l)){
                                JSONArray array = CommonUtils.stringToJsonArray(l);
                                list.add(index+"");
                                index += 1;
                                if (array != null && array.length() > 0){
                                    Log.e("TAG","发现数量="+array.length());
                                    int count = array.length()/3;
                                    if (array.length()%3 > 0){
                                        count += 1;
                                    }
                                    index += count;
                                    Log.e("TAG","发现行数="+count);
                                }
                            }
                        }

                    }
                }
                if (list.size() > 0){
                    TwoTuple twoTuple = new TwoTuple(index, CommonUtils.listToString(list));
                    return twoTuple;
                }
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 获取用户标签
     * @param jsonString
     * @return
     */
    public static List<WeiShuLabelInfoModel> getWeiShuLabelInfoModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                List<WeiShuLabelInfoModel> list = new ArrayList<WeiShuLabelInfoModel>();
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString(APIKey.dataKey);
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                JSONArray jsonArray = CommonUtils.stringToJsonArray(dataString);
                if (jsonArray != null && jsonArray.length() > 0){
                    for (int i = 0; i < jsonArray.length(); i++){
                        Gson mgson = new Gson();
                        String string = jsonArray.getString(i);
                        WeiShuLabelInfoModel model = mgson.fromJson(
                                string, WeiShuLabelInfoModel.class);
                        list.add(model);
                    }
                }else {
                    //System.out.print("jsonArray是空的\n");
                }
                return list;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 微纸条详情
     * @param jsonString
     * @return
     */
    public static WeiShuInfoDetailModel getWeiShuInfo(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString(APIKey.dataKey);
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                Gson mgson = new Gson();
                WeiShuInfoDetailModel model = mgson.fromJson(
                        dataString, WeiShuInfoDetailModel.class);
                return model;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 微纸条内容详情
     * @param jsonString
     * @return
     */
    public static WeiShuContentDetailModel getWeiShuContentDetailModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString(APIKey.dataKey);
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                Gson mgson = new Gson();
                WeiShuContentDetailModel model = mgson.fromJson(
                        dataString, WeiShuContentDetailModel.class);
                if (!CommonUtils.isEmpty(model.getImg())){
                    model.setImglist(CommonUtils.stringToArrayList(model.getImg()));
                }
                return model;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 获取微纸条内容列表
     * @param jsonString
     * @return
     */
    public static List<WeiShuContentDetailModel> getWeiShuContentDetailModelList(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                List<WeiShuContentDetailModel> list = new ArrayList<WeiShuContentDetailModel>();
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString(APIKey.dataKey);
                if (CommonUtils.isEmpty(dataString)){
                    //Log.e("微纸条","数据是空的\n");
                    return null;
                }
                JSONArray jsonArray = CommonUtils.stringToJsonArray(dataString);
                if (jsonArray != null && jsonArray.length() > 0){
                    //Log.e("微纸条","拿到数据大小="+jsonArray.length()+"\n");
                    for (int i = 0; i < jsonArray.length(); i++){
                        Gson mgson = new Gson();
                        String string = jsonArray.getString(i);
                        //Log.e("微纸条","内容="+string+"\n");
                        WeiShuContentDetailModel model = mgson.fromJson(
                                string, WeiShuContentDetailModel.class);
                        if (!CommonUtils.isEmpty(model.getImg())){
                            model.setImglist(CommonUtils.stringToArrayList(model.getImg()));
                        }
                        if (model.getContentType() == 2){
                            model.setTime(CommonUtils.getNewChatTime((long)model.getCreatetime()*1000));
                        }else {
                            model.setTime(CommonUtils.getNewChatTime((long)model.getUpdatetime()*1000));
                        }

                        long time = (long)model.getUpdatetime();
                        DateModel dateModel = CommonUtils.getDateModel(time);
                        model.setSecond(dateModel.getSecond());
                        model.setMinute(dateModel.getMinute());
                        model.setHour(dateModel.getHour());
                        model.setDay(dateModel.getDay());
                        model.setMonth(dateModel.getMonth());
                        model.setYear(dateModel.getYear());

                        list.add(model);
                    }
                }else {
                    //Log.e("微纸条","jsonArray是空的\n");
                    //System.out.print("jsonArray是空的\n");
                }
                return list;
            }catch (Exception e){
                //Log.e("微纸条","错误信息："+e.getMessage()+"\n");
                return null;
            }
        }
        return null;
    }

    /**
     * 获取分类列表
     * @param jsonString
     * @return
     */
    public static List<ClassifyModel> getClassifyModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                List<ClassifyModel> list = new ArrayList<ClassifyModel>();
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString(APIKey.dataKey);
                if (CommonUtils.isEmpty(dataString)){
                    //Log.e("微纸条","数据是空的\n");
                    return null;
                }
                JSONArray jsonArray = CommonUtils.stringToJsonArray(dataString);
                if (jsonArray != null && jsonArray.length() > 0){
                    //Log.e("微纸条","拿到数据大小="+jsonArray.length()+"\n");
                    for (int i = 0; i < jsonArray.length(); i++){
                        Gson mgson = new Gson();
                        String string = jsonArray.getString(i);
                        //Log.e("微纸条","内容="+string+"\n");
                        ClassifyModel model = mgson.fromJson(
                                string, ClassifyModel.class);
                        list.add(model);
                    }
                }else {
                    //Log.e("微纸条","jsonArray是空的\n");
                    //System.out.print("jsonArray是空的\n");
                }
                return list;
            }catch (Exception e){
                //Log.e("微纸条","错误信息："+e.getMessage()+"\n");
                return null;
            }
        }
        return null;
    }

    /**
     * 获取分类列表
     * @param jsonString
     * @return
     */
    public static List<BookmarkModel> getBookmarkModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                List<BookmarkModel> list = new ArrayList<BookmarkModel>();
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString(APIKey.dataKey);
                if (CommonUtils.isEmpty(dataString)){
                    //Log.e("微纸条","数据是空的\n");
                    return null;
                }
                JSONArray jsonArray = CommonUtils.stringToJsonArray(dataString);
                if (jsonArray != null && jsonArray.length() > 0){
                    //Log.e("微纸条","拿到数据大小="+jsonArray.length()+"\n");
                    for (int i = 0; i < jsonArray.length(); i++){
                        Gson mgson = new Gson();
                        String string = jsonArray.getString(i);
                        //Log.e("微纸条","内容="+string+"\n");
                        BookmarkModel model = mgson.fromJson(
                                string, BookmarkModel.class);
                        list.add(model);
                    }
                }else {
                    //Log.e("微纸条","jsonArray是空的\n");
                    //System.out.print("jsonArray是空的\n");
                }
                return list;
            }catch (Exception e){
                //Log.e("微纸条","错误信息："+e.getMessage()+"\n");
                return null;
            }
        }
        return null;
    }

    /**
     * 获取分类列表
     * @param jsonString
     * @return
     */
    public static List<WeiShuInfoDetailModel> getWeiShuInfoDetailModelFromBookmarkModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                List<WeiShuInfoDetailModel> list = new ArrayList<WeiShuInfoDetailModel>();
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString(APIKey.dataKey);
                if (CommonUtils.isEmpty(dataString)){
                    //Log.e("微纸条","数据是空的\n");
                    return null;
                }
                JSONArray jsonArray = CommonUtils.stringToJsonArray(dataString);
                if (jsonArray != null && jsonArray.length() > 0){

                    //Log.e("微纸条","拿到数据大小="+jsonArray.length()+"\n");
                    for (int i = 0; i < jsonArray.length(); i++){
                        Gson mgson = new Gson();
                        String string = jsonArray.getString(i);
                        //Log.e("微纸条","内容="+string+"\n");
                        BookmarkModel bookmarkModel = mgson.fromJson(
                                string, BookmarkModel.class);

                        WeiShuInfoDetailModel model = new WeiShuInfoDetailModel();
                        model.setType(0);
                        model.setUserid(bookmarkModel.getUserid());
                        model.setTitle(bookmarkModel.getBookmarkName());
                        model.setBookmarkName(bookmarkModel.getBookmarkName());
                        model.setBookmarkDetail(bookmarkModel.getBookmarkDetail());
                        model.setBookmarkId(bookmarkModel.getBookmarkId());
                        model.setContentCount(bookmarkModel.getContentCount());
                        model.setVisible(bookmarkModel.getVisible());
                        model.setUserid(bookmarkModel.getUserid());//不允许编辑
                        model.setHeader(bookmarkModel.getHeader());
                        model.setNickname(bookmarkModel.getNickname());
                        model.setIcon(bookmarkModel.getIcon());
                        model.setContentCount(bookmarkModel.getContentCount());
                        list.add(model);

                    }
                }else {
                    //Log.e("微纸条","jsonArray是空的\n");
                    //System.out.print("jsonArray是空的\n");
                }
                return list;
            }catch (Exception e){
                //Log.e("微纸条","错误信息："+e.getMessage()+"\n");
                return null;
            }
        }
        return null;
    }

    /**
     * 获取分类申请授权列表
     * @param jsonString
     * @return
     */
    public static List<ClassifyAuthInfoModel> getClassifyAuthInfoModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                List<ClassifyAuthInfoModel> list = new ArrayList<ClassifyAuthInfoModel>();
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString(APIKey.dataKey);
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                JSONArray jsonArray = CommonUtils.stringToJsonArray(dataString);
                if (jsonArray != null && jsonArray.length() > 0){
                    for (int i = 0; i < jsonArray.length(); i++){
                        Gson mgson = new Gson();
                        String string = jsonArray.getString(i);
                        ClassifyAuthInfoModel model = mgson.fromJson(
                                string, ClassifyAuthInfoModel.class);
                        list.add(model);
                    }
                }else {
                    //System.out.print("jsonArray是空的\n");
                }
                return list;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 微纸条分类详情
     * @param jsonString
     * @return
     */
    public static ClassifyModel getClassifyModelOne(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString(APIKey.dataKey);
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                Gson mgson = new Gson();
                ClassifyModel model = mgson.fromJson(
                        dataString, ClassifyModel.class);
                return model;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }


    /**
     * 微纸条分类授权
     * @param jsonString
     * @return
     */
    public static boolean getClassifyNeedAuth(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString("needAuth");
                if (CommonUtils.isEmpty(dataString)){
                    return false;
                }
                if (dataString.equals("1")){
                    return true;
                }
            }catch (Exception e){
                return false;
            }
        }
        return false;
    }

    /**
     * 微纸条分类授权码
     * @param jsonString
     * @return
     */
    public static String getClassifyAuthCode(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString("data");
                if (CommonUtils.isEmpty(dataString)){
                    return "";
                }
                return dataString;
            }catch (Exception e){
                return "";
            }
        }
        return "";
    }

    /**
     * 用户首页菜单
     * @param jsonString
     * @return
     */
    public static UserHomeMenuModel getUserHomeMenuModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                Gson mgson = new Gson();
                UserHomeMenuModel model = mgson.fromJson(
                        jsonObject.getString(APIKey.dataKey), UserHomeMenuModel.class);
                return model;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 用户首页推荐菜单
     * @param jsonString
     * @return
     */
    public static PublicHomeMenuModel getPublicHomeMenuModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                Gson mgson = new Gson();
                String publicString = jsonObject.getString("public");
                if (!CommonUtils.isEmpty(publicString)){
                    PublicHomeMenuModel model = mgson.fromJson(
                            publicString, PublicHomeMenuModel.class);
                    return model;
                }else {
                    return null;
                }
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 微纸条内容数量
     * @param jsonString
     * @return
     */
    public static int getWZTContentCount(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString("count");
                if (CommonUtils.isEmpty(dataString)){
                    return 0;
                }
                return Integer.valueOf(dataString);
            }catch (Exception e){
                return 0;
            }
        }
        return 0;
    }

    /**
     * 获取评论库列表
     * @param jsonString
     * @return
     */
    public static List<CommentStoreClassifyModel> getCommentStoreClassifyModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                List<CommentStoreClassifyModel> list = new ArrayList<CommentStoreClassifyModel>();
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString(APIKey.dataKey);
                if (CommonUtils.isEmpty(dataString)){
                    //Log.e("微纸条","数据是空的\n");
                    return null;
                }
                JSONArray jsonArray = CommonUtils.stringToJsonArray(dataString);
                if (jsonArray != null && jsonArray.length() > 0){
                    //Log.e("微纸条","拿到数据大小="+jsonArray.length()+"\n");
                    for (int i = 0; i < jsonArray.length(); i++){
                        Gson mgson = new Gson();
                        String string = jsonArray.getString(i);
                        //Log.e("微纸条","内容="+string+"\n");
                        CommentStoreClassifyModel model = mgson.fromJson(
                                string, CommentStoreClassifyModel.class);
                        list.add(model);
                    }
                }else {
                    //Log.e("微纸条","jsonArray是空的\n");
                    //System.out.print("jsonArray是空的\n");
                }
                return list;
            }catch (Exception e){
                //Log.e("微纸条","错误信息："+e.getMessage()+"\n");
                return null;
            }
        }
        return null;
    }

    /**
     * 获取评论库内容列表
     * @param jsonString
     * @return
     */
    public static List<CommentStoreModel> getCommentStoreModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                List<CommentStoreModel> list = new ArrayList<CommentStoreModel>();
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString(APIKey.dataKey);
                if (CommonUtils.isEmpty(dataString)){
                    //Log.e("微纸条","数据是空的\n");
                    return null;
                }
                JSONArray jsonArray = CommonUtils.stringToJsonArray(dataString);
                if (jsonArray != null && jsonArray.length() > 0){
                    //Log.e("微纸条","拿到数据大小="+jsonArray.length()+"\n");
                    for (int i = 0; i < jsonArray.length(); i++){
                        Gson mgson = new Gson();
                        String string = jsonArray.getString(i);
                        //Log.e("微纸条","内容="+string+"\n");
                        CommentStoreModel model = mgson.fromJson(
                                string, CommentStoreModel.class);
                        list.add(model);
                    }
                }else {
                    //Log.e("微纸条","jsonArray是空的\n");
                    //System.out.print("jsonArray是空的\n");
                }
                return list;
            }catch (Exception e){
                //Log.e("微纸条","错误信息："+e.getMessage()+"\n");
                return null;
            }
        }
        return null;
    }


    /**
     * 获取智慧排行榜列表
     * @param jsonString
     * @return
     */
    public static List<SmartRankModel> getSmartRankModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                List<SmartRankModel> list = new ArrayList<SmartRankModel>();
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString(APIKey.dataKey);
                //System.out.print("dataString="+dataString+"\n");
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                JSONObject jsonData = CommonUtils.stringToJson(dataString);
                //System.out.print("jsonData="+jsonData.getString(APIKey.carouselfigureKey)+"\n");
                String l = jsonData.getString("list");
                if (!CommonUtils.isEmpty(l)){
                    JSONArray jsonArray = CommonUtils.stringToJsonArray(l);
                    if (jsonArray != null && jsonArray.length() > 0){
                        for (int i = 0; i < jsonArray.length(); i++){
                            //System.out.print("jsonArray.get(i)="+jsonArray.getString(i)+"\n");
                            Gson mgson = new Gson();
                            String string = jsonArray.getString(i);
                            //System.out.print("string="+string+"\n");
                            SmartRankModel model = mgson.fromJson(
                                    string, SmartRankModel.class);
                            list.add(model);
                        }
                    }else {
                        //System.out.print("jsonArray是空的\n");
                    }
                }
                return list;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 获取智慧排行点赞列表
     * @param jsonString
     * @return
     */
    public static List<SmartRankModel> getSmartRankModelOfLike(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                List<SmartRankModel> list = new ArrayList<SmartRankModel>();
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString(APIKey.dataKey);
                //System.out.print("dataString="+dataString+"\n");
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                JSONArray jsonArray = CommonUtils.stringToJsonArray(dataString);
                if (jsonArray != null && jsonArray.length() > 0){
                    for (int i = 0; i < jsonArray.length(); i++){
                        //System.out.print("jsonArray.get(i)="+jsonArray.getString(i)+"\n");
                        Gson mgson = new Gson();
                        String string = jsonArray.getString(i);
                        //System.out.print("string="+string+"\n");
                        SmartRankModel model = mgson.fromJson(
                                string, SmartRankModel.class);
                        list.add(model);
                    }
                }else {
                    //System.out.print("jsonArray是空的\n");
                }
                return list;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 获取智慧排行榜封面
     * @param jsonString
     * @return
     */
    public static SmartRankCoverModel getSmartRankCoverModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString(APIKey.dataKey);
                //System.out.print("dataString="+dataString+"\n");
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                JSONObject jsonData = CommonUtils.stringToJson(dataString);
                //System.out.print("jsonData="+jsonData.getString(APIKey.carouselfigureKey)+"\n");
                String l = jsonData.getString("cover");
                if (!CommonUtils.isEmpty(l)){
                    Gson mgson = new Gson();
                    SmartRankCoverModel model = mgson.fromJson(
                            l, SmartRankCoverModel.class);
                    return model;
                }
                return null;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 获取智慧排行榜分享
     * @param jsonString
     * @return
     */
    public static SmartRankShareModel getSmartRankShareModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString(APIKey.dataKey);
                //System.out.print("dataString="+dataString+"\n");
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                JSONObject jsonData = CommonUtils.stringToJson(dataString);
                //System.out.print("jsonData="+jsonData.getString(APIKey.carouselfigureKey)+"\n");
                String l = jsonData.getString("share");
                if (!CommonUtils.isEmpty(l)){
                    Gson mgson = new Gson();
                    SmartRankShareModel model = mgson.fromJson(
                            l, SmartRankShareModel.class);
                    return model;
                }
                return null;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 获取智慧排行榜我的信息
     * @param jsonString
     * @return
     */
    public static SmartRankMyInfo getSmartRankMyInfo(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString(APIKey.dataKey);
                //System.out.print("dataString="+dataString+"\n");
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                JSONObject jsonData = CommonUtils.stringToJson(dataString);
                //System.out.print("jsonData="+jsonData.getString(APIKey.carouselfigureKey)+"\n");
                String l = jsonData.getString("my");
                if (!CommonUtils.isEmpty(l)){
                    Gson mgson = new Gson();
                    SmartRankMyInfo model = mgson.fromJson(
                            l, SmartRankMyInfo.class);
                    return model;
                }
                return null;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }


    /**
     * 获取智慧排行榜我的信息
     * @param jsonString
     * @return
     */
    public static SmartRankMyInfo getSmartRankMyInfoOfAll(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString(APIKey.dataKey);
                //System.out.print("dataString="+dataString+"\n");
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                Gson mgson = new Gson();
                SmartRankMyInfo model = mgson.fromJson(
                        dataString, SmartRankMyInfo.class);
                return model;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 获取签到信息
     * @param jsonString
     * @return
     */
    public static SignDataModel getSignDataModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString("other");
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                Gson mgson = new Gson();
                SignDataModel model = mgson.fromJson(
                        dataString, SignDataModel.class);
                return model;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 获取收藏夹信息
     * @param jsonString
     * @return
     */
    public static BookmarkModel getBookmarkModelFromData(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString("data");
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                Gson mgson = new Gson();
                BookmarkModel model = mgson.fromJson(
                        dataString, BookmarkModel.class);
                return model;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 获取复制信息
     * @param jsonString
     * @return
     */
    public static CopyModel getCopyModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                String dataString = jsonObject.getString("data");
                if (CommonUtils.isEmpty(dataString)){
                    return null;
                }
                CopyModel copyModel = new CopyModel();
                copyModel.setCount(Integer.valueOf(dataString));
                String tip = jsonObject.getString("tip");
                copyModel.setTip(CommonUtils.formatString(tip));
                return copyModel;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

    /**
     * 小组件
     * @param jsonString
     * @return
     */
    public static WidgetModel getWidgetModel(String jsonString){
        if (!CommonUtils.isEmpty(jsonString)){
            try {
                JSONObject jsonObject = CommonUtils.stringToJson(jsonString);
                Gson mgson = new Gson();
                WidgetModel model = mgson.fromJson(
                        jsonObject.getString(APIKey.dataKey), WidgetModel.class);
                return model;
            }catch (Exception e){
                return null;
            }
        }
        return null;
    }

}
